Problem with Thornbush Farm level please help


#1

Here’s my code

loop:
     self.moveXY(43, 50)
    self.findNearestEnemy()
    if enemy:
        self.buildXY('fire-trap', 43, 50)
    self.moveXY(25, 34)
    enemy = self.findNearestEnemy()
    if enemy:    
        self.buildXY('fire-trap', 25, 34)
    self.moveXY(43, 20)
    self.findNearestEnemy()
    if enemy:
        self.buildXY('fire-trap',43, 20)

#2

Hi @cheeseburger900.
Welcome to the forum. Sadly I can only guess what your problem is. To get the most help possible, we need the following informations:

  1. What happens?
  2. What should happen?
  3. What have you tried to make it happen?

After this rather generic message:
You have 5 spaces in your second line. As Python is rather picky about indentations, it might help to simply delete this (not guaranteed).
Which brings me to my new (slightly modified) favorite sentence:

Indentations save lives, but more indentations won’t save more lives!


#3

Sorry to be that person JFBM but it iis lives not lifes


#4

Thank you, I will give the indentation suggestion a try!