supertux icon indicating copy to clipboard operation
supertux copied to clipboard

`wait()` command not working in console

Open Semphriss opened this issue 3 years ago • 1 comments

SuperTux version: Latest @ master System information: Ubuntu 20.04

Expected behavior

Calling wait in the console freezes the console for the requested amount of time.

Actual behavior

Calling wait in the console prints the number it was given as argument to the output, immediately returns to the command line, and comes back after the specified time to finish its tasks - all while the console is still usable anyways.

Steps to reproduce actual behavior

Basic:

  • Type wait(1); in the console + enter.

More serious:

  • Type wait(1); in the console + enter + up arrow + enter again, before the first wait() finished. Notice the errors printed to the console.

Semphriss avatar Oct 28 '22 00:10 Semphriss

I think everything is working as intended. If you type wait(5); print("waited 5 seconds") it waits 5 seconds before printing the message. Regarding the more serious way to reproduce, the error i get is Squirrel error: Problem while executing command (cannot suspend an already suspended vm) which happens if you manage to run a wait command when a script is already waiting.

tylerandari13 avatar Dec 10 '23 02:12 tylerandari13