Although I agree with Striker about posting the or a part of the script, if you have developer/advance, you could use script debugger to test the script and see where it goes wrong.
If not, pause the script at the point shere you think it goes wrong.