Can't get past Endangered Burl PLEASE HELP


#1

This is what I have and I can’t see what is wrong with it

Remember: don’t attack type “burl”!

if enemy.type is “burl”:
self.say(“I’m not attacking that Burl!”)

The “type” property tells you what kind of creature it is.

if enemy.type is “munchkin”:
self.attack(enemy)

Use “if” to attack a “thrower”.

if enemy.type is “thrower”:
self.attack(enemy)

If it’s an “ogre”, run away to the village

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


#2

First edi your post and make you code inside a tag

like this 

now remember that if monsters names is invisible then you have to use findnearstenemy and attack it


#3

how do I make it inside a tag


#4

Select your text and press the ending html tag icon , it’s look like this “</>”


#5

Hiya Stephen! To format the code, You can write it, highight it, and hit Ctl-K, or use this method:
http://discourse.codecombat.com/t/how-to-post-your-code-with-radiant-harmonious-formatting/1484?u=bunchofcrooks


#6

You guys need to in more simple ways because I am only 11.


#7

I just when to go ask my dad what a html was.


#8

Does your code have a

enemy=findNearestEnemy() 

at the beginning?


#9
# Remember: don't attack type "burl"!
if enemy.type is "burl":
    self.say("I'm not attacking that Burl!")

# The "type" property tells you what kind of creature it is.
if enemy.type is "munchkin":
    self.attack(enemy)



# Use "if" to attack a "thrower".
  if enemy.type is "thrower":
      self.attack(enemy)

# If it's an "ogre", run away to the village 
if enemy.type is "ogre":
    self.moveXY(41, 37)

#10

does that awnser your question


#11

Nice formating! You need to add something to your code to find the nearest enemy, and name whomever that is enemy…


#12

have you played the level I’m on


#13

Yup… if you are still stuck, you might want to review some earlier levels… let me take a look for a good one. We try to get folks to figure it out on their own rather than giving it to them on here… one min.


#14

Replaying the level called “Master of Names” in the dungeon area will refresh your memory. Let me know how it comes out!


#15

I replayed it and for my code I got this

enemy = self.findNearestEnemy()

    

if "type 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)

#16

It still doesn’t work and now I ambored cause it is no fun when you try a level for three days and still can’t get it


#17

Your earlier code has enemy.type in it… I think you need it here.


#18

You have just put one good code and remove the other one , please focus more , and it’s a good age to start programming , good luck


#19

the game said that it didn’t like the enemy. type but it likes the new one. But the new one keeps attacking the burls and I don’t know why. =(


#20

don’t know why i couldn’t find that lvl in the map Oo can you post the link of the lvl please
Edit found it