Dangerous key help

# Listen to the paladin and fetch the right key.

def onHear(event):
    # The pet can find the paladin and keys.
    paladinUnit = pet.findNearestByType("paladin")
    goldKey = pet.findNearestByType("gold-key")
    silverKey = pet.findNearestByType("silver-key")
    bronzeKey = pet.findNearestByType("bronze-key")
    # If event.speaker is paladinUnit:
    if event.speaker == paladinUnit:
        # If event.message is "Gold":
        if event.message == "Gold":
            # The pet should fetch the gold key.
            pet.fetch("gold-key")
        # If event.message is "Silver":
        if event.message == "Silver":
            # The pet should fetch the silver key.
            pet.fetch("silver-key")
        # If event.message is "Bronze":
        if event.message == "Bronze":
            # The pet should fetch the bronze key.
            pet.fetch("bronze-key")

pet.on("hear", onHear)

39%20AM

Use a pet that is on the ground

why?
20 characterssssss

I don’t know just use one on the ground then it should work. Your code is fine

No it doesn’t work.
20 chars

@Archion :disappointed_relieved:

I don’t know then. it should work :thinking:

What pet did you use @Archion

Where is the level? can you post a link

Ok https://codecombat.com/play/level/dangerous-key?

I used a griffin baby pet

Ok
2000000 characters

Did you win? :face_with_raised_eyebrow:

Yea 20000000000000000 chars

Could you help me
20000000 character

maybe this is a bug for you. You should report it

oh no a bug!:open_mouth:

this is a #bugs 200000000000000000 chars