Hmmm... This is indeed an odd error, as it is one involving the reduce cost materia which involves sp and shouldn't effect something as small as that. I wouldn't be sure of how to fix this, as I'm not quite experienced enough to do so, but I can say only two things. One, try rearranging the order of your scripts, as this is a solution to about 70% of the problems people have with scripts. If you know what you are doing enough with scripts, try to fix it yourself. Two, try putting the scripts into a new project, using only the necessary scripts that you are using for the tests. If they work, then add the rest in carefully in an order that makes sense. That is the only advice I'm really capable of giving, since I too would try those things first. You'd be amazed though by how many errors and script issues I have fixed just trying those two things. Try em out and see if you can get it to work that way. If it doesn't. you'll probably have to wait for a script fix. Best of luck in your attempts to resolve the problem.
AlphaAO