I need help please here is my code
# Listen to the paladin and fetch the right key.
def onHear(event):
# The pet can find the paladin and keys.
paladin = pet.findNearestByType("paladin")
goldKey = pet.findNearestByType("gold-key")
silverKey = pet.findNearestByType("silver-key")
bronzeKey = pet.findNearestByType("bronze-key")
# If event.speaker is the paladin:
if event.speaker.type == "paladin":
# 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)
My pet keep saying I can’t carry that.
Why is that?
And also I am using a raven as a pet.
Plus there is no error in my code.