The Farmer Was Replaced

The Farmer Was Replaced

drax14 16. des. 2024 kl. 8.03
next_x, next_y = measure() not working
next_x, next_y = measure() from the example dinosaurus
generate error:
Error: The left hand side of the assignment didn't match the right hand side.
In:
next_x, next_y = measure()

help my
< >
Viser 14 av 4 kommentarer
BRNK 16. des. 2024 kl. 23.04 
It's not saying that's how to assign the value, it's telling you what to expect from `measure()` when you use it over an apple. Use quick_print(), that should be more than enough of a hint to get you going.
Leo 17. des. 2024 kl. 14.45 
if your snake eats itself- you will have this error xD in my case if measure() == None I just switch hats twice to overcome this issue
drax14 17. des. 2024 kl. 23.47 
thx
I had to use if for 100% functionality
if get_entity_type() == Entities.Apple: next_x, next_y = measure()
Sist redigert av drax14; 17. des. 2024 kl. 23.54
HarmG 18. des. 2024 kl. 9.52 
You can just do location = measure() then use location[0] for x and location[1] for y
< >
Viser 14 av 4 kommentarer
Per side: 1530 50