it should make a size ten circle and square correctly but it tells me for this statement self.moveXY({“x”: newX, “y”: newY}) that i need to move to a x,y position. please help me
I believe I may have the same problem as aaronlee3, I’ve typed (i think) the correct code into the spaces suggested, then the pop-up tells me "Line 14:
moveXY requires 2 numbers as arguments. x is a NaN which is type ‘number’,
not ‘number’."
I did not change the original code except to try and fix the problem, then “reloaded” the code anyway, its still not working, thanks for advice in advance. =D
@lighte Looks like you are passing a NaN value to the moveXY function—revise your code to make sure you are not dividing by zero or using non-number variables in your maths. Please post your code if you need further help.
Thanks for the quick reply! The code that seems to have the issue is the original code,
def drawCircle(x, y, size):
angle = 0
self.toggleFlowers(False)
while angle <= Math.PI * 2:
newX = x + (size * Math.cos(angle))
newY = y + (size * Math.sin(angle))
self.moveXY(newX, newY) < [this is the line that the pop-up message indicates]
self.toggleFlowers(True)
angle += 0.2
drawCircle({"x": 28, "y": 36}, 10) < this is the code i entered to activate the line,if its my trigger thats the problem, I’m not sure what i need to change.
Thanks again!
This level can be beaten by using flags in real time, and while figuring out the full extent of this, you can even walk around the white x and make a square and get the goal for the circle, and you only have to make a shape around both x’s and the level can be completed, you should remove flags from being used in this level.
I summoned a new peasant in the same level and he/she isn’t a gardener. It will be cool in levels with the flower ring all peasants have this and toggleFlowers ability.