In the level “logical circles” in the backwoods forest map (on the northeast part of the map). I am tasked with getting the character to move up/down or left/right based on the criteria provided. I tried storing the hard coordinates for the positions marked on the map as variables in order to reduce the amount of coding needed.
u = 30, 33
d = 30, 15
secretD = secretA and secretB and secretC
if secretD:
hero.moveXY(u)
else:
hero.moveXY(d)
I get the error as follows:
Line #: ArguementError: moveXY takes only undefined argument. should have type number, but got array. moveXY requires 2 numbers as arguments, x and y.
If I’m interpreting this correctly it’s saying that it’s reading the variable as a two number array instead of the first number for X and the second number for Y. Is that correct?
Is there a way to rewrite the code to keep it concise while still following this train of thought by either calling the variable in a different way or storing the coordinates in a slightly different manner?