When I wrote my code, I thought it was perfect, but every time I try it, when I have to build the fence, it says that I need a string to build it, and this has never happened before, and I don’t know how do do a string. Here is my code:
while self.now() < 20:
self.say(“message”)
while self.gold < 60:
item = self.findNearest(self.findItems())
coins = self.findItems()
coinIndex = 0
while coinIndex < len(coins):
coin = coins[coinIndex]
if coin.value > 1:
self.moveXY(coin.pos.x, coin.pos.y)
coinIndex += 1
while self.pos.x > 16:
self.move({'x': 15, 'y': 38})
self.buildXY("fence", 21, 37)
Help please!