Problem with Script

So I was working on my game when I decided that I wanted to add the Side View Battle system.. I watched a step to step tutorial on it, did everything I had to and it didn't work.. so I decided to then get rid of it so I deleted everything in the materials tab (where I inserted the script) and now the battles don't work.. For reference it comes up with this error:

"Script ' (Insert here) ' line 851 : TypeError occurred.

no implicit conversion from nil to integer. "

And like the idiot I am before I did all of this I didn't back up my project before starting the side view battle script. So does this mean that I have to make another project now? Or can this error be fixed..

Thanks for the help in advanced. If I have to start over it will be a pain.
Please link to the script you're using - there are a dozen different sideview scripts.

But if that is your error message:

"Script ' (Insert here) ' line ...
Then you didn't even copy it correctly into the script editor, because that header contains your instructions and should never get the script itself.

I suggest this tutorial:

How to use a script - RMVX Ace Tutorials - RPG Maker Forums
Sorry... This post took awhile to go up and after it did its fine now, it just says that error if i do a battle test with troops.. I thank you for the help.

Original thread: https://forums.rpgmakerweb.com/threads/problem-with-script.43824/