Question about summoning

So I try to summon and command some troops but then it says it got confused with the fake human (wtich is the blue fox) how do I fix it?

friends = hero.findFriends()
if hero.gold > hero.costOf("soldier"):
        hero.summon("soldier")
    for friend in friends:
        hero.command(friend, "attack", enemy)

I don’t know how to command either @Eric_Tang

put a if friend .type == soldier in it

Where should I put it @cheddarcheese

:or if friend and friend.type==commandableTypes:

 blah blah blah blah

ok?
if
this helps I was happy to help! (sorry for blah’s :sweat_smile:)

in the for loop is what @cheddarcheese is saying(I think)

no prob! (20 charrrrrrrrrrrrrrrrrrrrrrrrr)