Stack Overflow Help

Hello,

I’ve been coding a 3D chess game and have discovered a set of moves which cause stack overflow in the editor.

This is the first time I’ve come across this problem and haven’t a clue what to do about it. I’ve looked for functions that call themselves and stupidly large variables, but I don’t have either…

I’ve attached my script though I did have to rename it to a .txt file to get it to upload, its a js originally. The link is: http://answers.unity3d.com/storage/temp/671-Main.txt

Any help would be greatly appreciated!

Thanks,

Rob

Your script is way too big and complicated for me to understand it all, but I noticed that you have two functions (ReturnMovesArray and CheckIfSquareCovered), that can call each other…maybe you get an infinite loop there…