GDScript: division by zero in operator '/'

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Witcher64

I am getting that error on this line:
$MoveTween.interpolate_property(self, “position”, position,
position + moves[facing] * tile_size,
1 / speed, Tween.TRANS_SINE, Tween.EASE_IN_OUT)
my speed is set to three and when i erase my division sign my player moves too fast to see. i do not understand why this is happening or what I need to do to fix it. Thanks for the help, I am a total noob.

Please don’t post the same question twice. Use the edit button if you want to edit it.

Zylann | 2020-09-24 13:15

:bust_in_silhouette: Reply From: Witcher64

if anyone runs into this, perhaps you made the same mistake I did. I thought my speed was set to three, but that was the speed in my animation inspector, not my player node.

Thank you for the hint! I also encountered this error.

Artik_MC | 2021-08-01 05:27