Luca_S, on 02 November 2019 - 08:09 PM, said:
Quote
As the return needs to be the last statement in a block Lua is going to interpretreturn print(stuck) endAs returning the return value of print(stuck), which means print(stuck) is executed again.
Other than that I see no reason why the return shouldn't work, please post your whole code.
Yeah, essentially you're doing return print(stuck) as you might do return 5 or something. The return statement will return from the function though so you must be calling fwd in a loop somewhere.