When starting Cloudrip Mountain 8 / Hunting Party, I get an error message that says:
Line 352 TypeError (picture attached)
I don’t even have a line 352 so I don’t know what to do about this. Does anyone have any advice?
When starting Cloudrip Mountain 8 / Hunting Party, I get an error message that says:
Line 352 TypeError (picture attached)
I don’t even have a line 352 so I don’t know what to do about this. Does anyone have any advice?
Hello and welcome to codecombat discourse @GreenBadger540! This is a cozy forum where you can share ideas, share fan art, get assistance for code, etc! Before you proceed, we hope that you review this topic, which shows all essentials of this board! Thanks!
That is wierd. I do not see any mistake in your code. Try to email support@codecombat.com and tell them about the problem and send them the screenshot. They should be able to help you solve this issue.
Andrei
Thank you for your advice. I’ll try that!
Are you coming from javascript?
soldiers = hero.findFriends() # I really like the place ( outside the while true )
# where you find friends :-)
while True:
for i in soldiers: # replace i with soldier
# soldier = soldiers[i] // valid for javascript no need of it in python
# your code
Hello and welcome to codecombat discourse @GreenBadger540 ! This is a cozy forum where you can share ideas, share fan art, get assistance for code, etc! Before you proceed, we hope that you review this topic, which shows all essentials of this board! Thanks!
I think it’s referring to line 352 of the interpreter. And, I think xython is on to something…
How do you think if you send one of your soldiers to certain death at the beginning of the game will he see at its end his killers?
soldiers = hero.findFriends()
while True:
soldier = soldiers[0]
if soldier.health > 0:
hero.command(soldier, "move", {"x":65, "y":17})
if hero.time> 29:
enemies = soldier.findEnemies()
enemy = soldier.findNearest(enemies)
console.log("time:" + hero.time +
" closest enemy:" + enemy.id +
" number of enemies: " + enemies.length)
will the code work, what the console messages will be?
@AnSeDra you liked my post, so can you share to all your answer?
This is what appears in my console:
time:29.066666666666666 closest enemy:Karnaugh number of enemies: 4
Andrei