[SOLVED] The Two Flowers level in Cloudrip Mountain for peter palov and every one!

Hello every one please answer my question in the topic please

1 Like

Please, can you post your code and equipment so I can help you.

1 Like

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

1 Like

Screen Shot 2020-10-03 at 9.41.48 AM
Use this to format you code. It is at

2 Likes

or you can see this How to Post Your Code With Radiant, Harmonious Formatting In this way, everyone’s code can be read easily

2 Likes

Thank you but i will try

1 Like

You can send your photos using the icon on the right of the heart

1 Like

You have to write:

if friend and friend.type != "peasant":

because peasants can’t attack.

3 Likes

And you need a for loop to command your soldiers.

Andrei

3 Likes

Oh ok Thank you very much friend.

3 Likes

1 Like

I already use the for loop but why is it still error?

1 Like

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

2 Likes

Can you post your code correctly as Code_Master said?

2 Likes

1 Like