Ahh, scripting I see. Have you tried posting in the Script Help Thread already? If you read the first post of that thread you'll see that there are a couple of guidelines before posting, like searching the thread in case your problem has been answered, etc. It might take a moment for you to get an answer there, though, so you have to be patient. ;)
Also I'll go on ahead and link you a fairly popular, possibly outdated but equally useful XSE Scripting Tutorial just in case you haven't seen it, because the solution to your problems might also be found there. Again, I'm sorry if I have zero scripting knowledge whatsoever and that I can't help you directly. u_u But still, I hope this helps! If it doesn't suffice, you could always kindly ask a fellow hacker who seems to know stuff about that to get help in person. :) Or try scripting it again! Maybe you can fix it yourself if you keep trying. :3 Good luck!