Hi! I'm new to the Easy FPS Editor CE and I'm trying to figure out why my if-statements don't work as expected. I have a loop-script that is supposed to spawn enemies at random with a delay by ticking up a "spawnPoints" variable that is used to "purchase" enemies. Enemies will then only spawn if a "diceRoll" is higher than a specific value.
```
posX = RANDOM(0,64) posY = RANDOM(0,64) diceRoll = RANDOM(1, 1000) willSpawn = 940 // Check if spawnPoints are enough for spawning an enemy if $map.spawnPoints > $map.spawnCost { // Check the dice roll if $diceRoll > $willSpawn { entity spawnat "bat_angry" $posX $posY 0 map.spawnedEnemies++ map.spawnPoints=0 } else { map.spawnPoints++ } } else { map.spawnPoints++ } status "$map.spawnPoints"
```
Somehow the inner else-statement gets executed instead of the outer, even though I can see that the spawnPoints are lower than the spawnCost.