# Can't get past Endangered Burl PLEASE HELP

**URL:** <https://discourse.codecombat.com/t/cant-get-past-endangered-burl-please-help/1892>\
**Category:** Ambassador\
**Created:** [December 14, 2014, 11:02pm UTC](https://discourse.codecombat.com/t/cant-get-past-endangered-burl-please-help/1892 "2014-12-14T23:02:20Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![BunchofCrooks](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/bunchofcrooks/32/2113_2.png) [@BunchofCrooks](https://discourse.codecombat.com/u/BunchofCrooks)\
**Post date:** [December 15, 2014, 12:10am UTC](https://discourse.codecombat.com/t/cant-get-past-endangered-burl-please-help/1892/21 "2014-12-15T00:10:11Z")

</div>

It is attacking the burl because “type burl” isn’t checking to see if it is a burl or not. Could you post the complete code with formating again so I can take a look and see if it is an indenting problem?

---

<div class="post-metadata">

**Author:** ![ReFinig](https://avatars.discourse-cdn.com/v4/letter/r/8e7dd6/32.png) [@ReFinig](https://discourse.codecombat.com/u/ReFinig)\
**Post date:** [December 15, 2014, 12:14am UTC](https://discourse.codecombat.com/t/cant-get-past-endangered-burl-please-help/1892/22 "2014-12-15T00:14:34Z")

</div>

Too bad it 00:10 am here , really want to help but have to sleep , so here some suggestion

combine your first code with the 2nd one , you have removed enemy.type so make it back but don’t forget to keep enemy = findnearsttenemy ,

---

<div class="post-metadata">

**Author:** ![Rytrik](https://avatars.discourse-cdn.com/v4/letter/r/3e96dc/32.png) [@Rytrik](https://discourse.codecombat.com/u/Rytrik)\
**Post date:** [December 15, 2014, 12:33am UTC](https://discourse.codecombat.com/t/cant-get-past-endangered-burl-please-help/1892/23 "2014-12-15T00:33:39Z")

</div>

`enemy.type is "burl":` perhaps? 🙂

the ‘is’ needs to be in there.

---

<div class="post-metadata">

**Author:** ![Stephen591](https://avatars.discourse-cdn.com/v4/letter/s/8dc957/32.png) [@Stephen591](https://discourse.codecombat.com/u/Stephen591)\
**Post date:** [December 15, 2014, 12:53am UTC](https://discourse.codecombat.com/t/cant-get-past-endangered-burl-please-help/1892/24 "2014-12-15T00:53:02Z")

</div>

the third level on the second map

---

<div class="post-metadata">

**Author:** ![Stephen591](https://avatars.discourse-cdn.com/v4/letter/s/8dc957/32.png) [@Stephen591](https://discourse.codecombat.com/u/Stephen591)\
**Post date:** [December 15, 2014, 12:57am UTC](https://discourse.codecombat.com/t/cant-get-past-endangered-burl-please-help/1892/25 "2014-12-15T00:57:31Z")

</div>

```python
    enemy = self.findNearestEnemy()
    
        
    
    if enemy.type is "burl":
        self.say("I'm not attacking that Burl!")
    
       
    if "type munchkin":
          self.attack(enemy)
    
    if "type thrower":
          self.attack(enemy)
    
    if "type ogre":
        self.moveXY(41, 37)

```

---

<div class="post-metadata">

**Author:** ![Stephen591](https://avatars.discourse-cdn.com/v4/letter/s/8dc957/32.png) [@Stephen591](https://discourse.codecombat.com/u/Stephen591)\
**Post date:** [December 15, 2014, 12:58am UTC](https://discourse.codecombat.com/t/cant-get-past-endangered-burl-please-help/1892/26 "2014-12-15T00:58:15Z")

</div>

Help pease it still isn’t working and I don’t understand

---

<div class="post-metadata">

**Author:** ![Stephen591](https://avatars.discourse-cdn.com/v4/letter/s/8dc957/32.png) [@Stephen591](https://discourse.codecombat.com/u/Stephen591)\
**Post date:** [December 15, 2014, 12:59am UTC](https://discourse.codecombat.com/t/cant-get-past-endangered-burl-please-help/1892/27 "2014-12-15T00:59:11Z")

</div>

what you guys want me to do

---

<div class="post-metadata">

**Author:** ![BunchofCrooks](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/bunchofcrooks/32/2113_2.png) [@BunchofCrooks](https://discourse.codecombat.com/u/BunchofCrooks)\
**Post date:** [December 15, 2014, 1:02am UTC](https://discourse.codecombat.com/t/cant-get-past-endangered-burl-please-help/1892/28 "2014-12-15T01:02:33Z")

</div>

OK, you changed the “type burl” thing to

```python
if enemy.type is "burl":

```

which is good… change the others as well

---

<div class="post-metadata">

**Author:** ![Stephen591](https://avatars.discourse-cdn.com/v4/letter/s/8dc957/32.png) [@Stephen591](https://discourse.codecombat.com/u/Stephen591)\
**Post date:** [December 15, 2014, 1:08am UTC](https://discourse.codecombat.com/t/cant-get-past-endangered-burl-please-help/1892/29 "2014-12-15T01:08:51Z")

</div>

it is just putting an red x under my character but not donig any thing or saying what is wrong my cod I have so far is:

```
enemy = self.findNearestEnemy()

    

if enemy.type is "burl":
    self.say('I am not attacking that Burl!')

   
if enemy.type is "munchkin":
      self.attack(enemy

if enemy.type is "thrower":
    self.attack(enemy)

if enemy.type is 'ogre':
    self.moveXY(41, 37)
```

---

<div class="post-metadata">

**Author:** ![BunchofCrooks](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/bunchofcrooks/32/2113_2.png) [@BunchofCrooks](https://discourse.codecombat.com/u/BunchofCrooks)\
**Post date:** [December 15, 2014, 1:15am UTC](https://discourse.codecombat.com/t/cant-get-past-endangered-burl-please-help/1892/30 "2014-12-15T01:15:12Z")

</div>

Ok… is your loop in there somewhere?

---

<div class="post-metadata">

**Author:** ![Stephen591](https://avatars.discourse-cdn.com/v4/letter/s/8dc957/32.png) [@Stephen591](https://discourse.codecombat.com/u/Stephen591)\
**Post date:** [December 15, 2014, 1:16am UTC](https://discourse.codecombat.com/t/cant-get-past-endangered-burl-please-help/1892/31 "2014-12-15T01:16:53Z")

</div>

no where do I put it

---

<div class="post-metadata">

**Author:** ![BunchofCrooks](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/bunchofcrooks/32/2113_2.png) [@BunchofCrooks](https://discourse.codecombat.com/u/BunchofCrooks)\
**Post date:** [December 15, 2014, 1:19am UTC](https://discourse.codecombat.com/t/cant-get-past-endangered-burl-please-help/1892/32 "2014-12-15T01:19:09Z")

</div>

Loops generally go in the beginning of your code… so try:

```python
loop:
    enemy = self.findNearestEnemy()
    THE-REST-OF-YOUR-CODE-GOES-HERE

```

---

<div class="post-metadata">

**Author:** ![Stephen591](https://avatars.discourse-cdn.com/v4/letter/s/8dc957/32.png) [@Stephen591](https://discourse.codecombat.com/u/Stephen591)\
**Post date:** [December 15, 2014, 1:22am UTC](https://discourse.codecombat.com/t/cant-get-past-endangered-burl-please-help/1892/33 "2014-12-15T01:22:53Z")

</div>

does the rest of my code have to have four spaces infront of it

---

<div class="post-metadata">

**Author:** ![BunchofCrooks](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/bunchofcrooks/32/2113_2.png) [@BunchofCrooks](https://discourse.codecombat.com/u/BunchofCrooks)\
**Post date:** [December 15, 2014, 1:23am UTC](https://discourse.codecombat.com/t/cant-get-past-endangered-burl-please-help/1892/34 "2014-12-15T01:23:37Z")

</div>

You will have to watch the tabs carefully here, and I don’t want that to trip you up so it should look something like this:

```python
loop:    
    enemy = self.findNearestEnemy()

    if enemy.type is "burl":
        self.say('I am not attacking that Burl!')

    if enemy.type is "munchkin":
        self.attack(enemy

    if enemy.type is "thrower":
        self.attack(enemy)

    if enemy.type is 'ogre':
        self.moveXY(41, 37)

```

---

<div class="post-metadata">

**Author:** ![Stephen591](https://avatars.discourse-cdn.com/v4/letter/s/8dc957/32.png) [@Stephen591](https://discourse.codecombat.com/u/Stephen591)\
**Post date:** [December 15, 2014, 1:29am UTC](https://discourse.codecombat.com/t/cant-get-past-endangered-burl-please-help/1892/35 "2014-12-15T01:29:26Z")

</div>

> [@Stephen591](#):
>
> enemy = self.findNearestEnemy()
> 
> if enemy.type is “burl”:  
> self.say(‘I am not attacking that Burl!’)
> 
> if enemy.type is “munchkin”:  
> self.attack(enemy
> 
> if enemy.type is “thrower”:  
> self.attack(enemy)
> 
> if enemy.type is ‘ogre’:  
> self.moveXY(41, 37)

it worked tank you sooooooooooooooooooooooooooooooooooooooo much you are my hero =) =0 thank you thank you thank you thank you thank you thank you thank you thank you thank you thank you thank you thank you thank you thank you thank you thank you thank you

---

<div class="post-metadata">

**Author:** ![BunchofCrooks](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/bunchofcrooks/32/2113_2.png) [@BunchofCrooks](https://discourse.codecombat.com/u/BunchofCrooks)\
**Post date:** [December 15, 2014, 1:29am UTC](https://discourse.codecombat.com/t/cant-get-past-endangered-burl-please-help/1892/36 "2014-12-15T01:29:28Z")

</div>

I ran your code successfuly after fixing a small parenthesis error. I would recommend going back and reviewing loops and if/else statements before continuing. They are used a whole lot.

---

<div class="post-metadata">

**Author:** ![BunchofCrooks](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/bunchofcrooks/32/2113_2.png) [@BunchofCrooks](https://discourse.codecombat.com/u/BunchofCrooks)\
**Post date:** [December 15, 2014, 1:30am UTC](https://discourse.codecombat.com/t/cant-get-past-endangered-burl-please-help/1892/37 "2014-12-15T01:30:37Z")

</div>

Good luck! It was no trouble. If you need anything else post it up, but I am off for the evening. G’night!

---

<div class="post-metadata">

**Author:** ![Stephen591](https://avatars.discourse-cdn.com/v4/letter/s/8dc957/32.png) [@Stephen591](https://discourse.codecombat.com/u/Stephen591)\
**Post date:** [December 15, 2014, 1:32am UTC](https://discourse.codecombat.com/t/cant-get-past-endangered-burl-please-help/1892/38 "2014-12-15T01:32:57Z")

</div>

Thank you! 😀

---

<div class="post-metadata">

**Author:** ![BunchofCrooks](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/bunchofcrooks/32/2113_2.png) [@BunchofCrooks](https://discourse.codecombat.com/u/BunchofCrooks)\
**Post date:** [December 15, 2014, 1:34am UTC](https://discourse.codecombat.com/t/cant-get-past-endangered-burl-please-help/1892/39 "2014-12-15T01:34:47Z")

</div>

lol…

```python
loop:
    self.say("You're welcome")

```

---

<div class="post-metadata">

**Author:** ![horizonrunner1](https://avatars.discourse-cdn.com/v4/letter/h/eb8c5e/32.png) [@horizonrunner1](https://discourse.codecombat.com/u/horizonrunner1)\
**Post date:** [April 4, 2015, 6:36pm UTC](https://discourse.codecombat.com/t/cant-get-past-endangered-burl-please-help/1892/40 "2015-04-04T18:36:25Z")

</div>

Hey guys. I think this is a **glitch**. When I press,

```
if (enemy.type == "thrower") {
    this.attack(enemy);

```

}  
It won’t attack the archers. Is it a glich or no.]  
Thx,

[Previous page](https://discourse.codecombat.com/t/cant-get-past-endangered-burl-please-help/1892.md?page=1)

[Next page](https://discourse.codecombat.com/t/cant-get-past-endangered-burl-please-help/1892.md?page=3)
