Hello every one please answer my question in the topic please
Please, can you post your code and equipment so I can help you.
Ok wait a minute do i have to take a picture of my hero and my code ok i will do just wait a minute .
This is my code i don’t under stand so i did not write any code .
If the peasant is damaged, the flowers will shrink!
def summonSoldiers():
if hero.gold >= hero.costOf(“soldier”):
hero.summon(“soldier”)
Define the function: commandSoldiers
Define the function: pickUpNearestCoin
peasant = hero.findByType(“peasant”)[0]
while True:
summonSoldiers()
# commandSoldiers()
# pickUpNearestCoin()
I still don’t know how to send a picture of my here ( i have many hero i don’t know what to use too?
May i contact you by skype now because i want to talk to you about the code in skype . My skype is Wongwarit Wynn.
Please format your code use
type or paste code here
to do it
or you can see this How to Post Your Code With Radiant, Harmonious Formatting In this way, everyone’s code can be read easily
Thank you but i will try
You can send your photos using the icon on the right of the heart
You have to write:
if friend and friend.type != "peasant":
because peasants can’t attack.
And you need a for loop to command your soldiers.
Andrei
Oh ok Thank you very much friend.
I already use the for loop but why is it still error?
You should command friend, not the first element of the array. And you only should command your soldiers to attack the enemies if there are any.
Andrei
Can you post your code correctly as Code_Master said?