The two flowers, could use some help

having issues with soldier not being defined but have moved it everywhere lol. forgot how to post my code here. defined my function but no matter how i code commandSoldier its invalid. Using python

Please use this link FAQ - Check Before Posting to get how to post code and describe your problem more careful.