Hi there I got a code error stucking few days on Thunderhooves
My code is like:
yak = hero.findNearestEnemy()
# If yak.pos.y is greater than hero.pos.y
if yak.pos.y > hero.pos.y:
# buildXY a “fence” 10m below the yak.
hero.buildXY(“fence”, yak.pos.x, yak.pos.y - 10)
# buildXY a “fence” 10m above the yak.
hero.buildXY(“fence”, yak.pos.x, yak.pos.y + 10)
# moveXY right 10m towards the oasis.
hero.moveXY(hero.pos.x + 10, hero.pos.y)
I got the python error code:
Line 11: ArgumentError:build’s argument toBuild should have type object, but got string:“fence”. You need a string to build; one of [“bear-trap”]
Any advice for this? Thanks