Raiders of the long dark help 2

this saids error hero has no method findByType()
this is my code:

arryn=hero.findByType('raider')

def peasant():
    friends=hero.findFriends()
    for friend in friends:
        if friend.type=="peasant":
            hero.command(friend, "move", {'x':arryn.pos.x,'y':arryn.pos.y})
def hero():
    friends=hero.findFriends()
    for friend in friends:
        if friend.type=="peasant":
            hero.moveXY(friend.pos.x, friend.pos.y)
while True:
    peasant()
    hero()
    

2 Likes

“It’s easier to get the enemy hero by it’s id, which is either “Hero Placeholder”(humans) or “Hero Placeholder 1” (ogres).”

I think u need a space between those two.