Game freezes when function is called
-
here is the script: https://drive.google.com/file/d/0B9MVwS2CRYUkdDlyX1VwM2lHSGM/view?usp=sharing
Just call ANYROOM.buildRoads(); and watch your game freeze. Any idea what causes this issue?
kind regards
-
`for (spawnPos.y; spawnPos.y < spawnPos.y + 3; spawnPos.y++) `
That's an infinite loop because spawnPos.y is changing before you compare it.