well, you have 2 options: either understand completely what you've created so far using my code - and then help yourself, or paste your entire script and hope someone will fix it for you (I won't do that, I'm not in the mood for debugging right now)
connection, sharing, dcc problems? click <here>
before asking for scripting help, read <this>
use