Stack Overflow Help


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:

Any help would be greatly appreciated!



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…