Play Home Contribute Github Join Us! Discourse Staff Members Github Contribution Guides Team

confusing error

I can’t figure out what’s wrong with my code. I keep getting a boolean value error. here is my code.

trap = game.spawnXY(“fire-spewer”, 40, 26)
trap.direction = “horizontal”
trap.direction = “vertical”
game.addCollectGoal(2)
player = game.spawnPlayerXY(“guardian”, 6, 30)
player.maxSpeed=20
player.maxHealth=999
game.addSurviveGoal(30)
game.addCollectGoal(2)
game.addMoveGoalXY( 35, 18)
while-True:

  • trap.disabled = "true"
    game.spawnXY(“fence”, 40, 30)
    game.spawnXY(“fence”, 40, 33)
    game.spawnXY(“fence”, 36, 34)
    game.spawnXY(“fence”, 32, 34)
    game.spawnXY(“skeleton”, 40, 26)
    game.spawnXY(“fence”, 40, 23)
    trap.spamCooldown=.1
    trap.spamInterval=9999999999999
    trap.spamEvery=.1
    game.spawnXY(“gem”, 36, 30)
    game.spawnXY(“gem”, 50, 26)

@Jamison_Brown, while it’s obvious this is in Game Dev…which level is it?

What is trap.spam?

trap.spamCooldown=.1
trap.spamInterval=9999999999999

it is part of the a fir-spewer code

i mean fire-spewer

Ok…it’s been a while since I’ve done the dev levels, so didn’t recognize it. Anyway, capitalize True.

I already tried that and it keeps saying disabled property should be a boolean value

What’s the name of the level? Can try testing your code, and/or comparing with what I used.

Tabula Rasa in game dev 1

Got it…the current problem is that your = “true” needs to be = True (no quotes)

Unfortunately, once that is fixed, you will encounter another error…Maximum spawns (1000) exceeded

This is because you are spawning inside the while loop.

The good new tho, I was able to complete it with just a couple of code tweaks :smiley:

thanks for the help.