0

I have a timeout problem when I'm checking the more comfortable version of mario app. When I'm running it by myself it works fine, but check50 returns time out in some cases, for example:" :( rejects a height of -1 timed out while waiting for input to be rejected

Log running ./mario... sending input -1... checking that input was rejected..."

Full log can be found here: https://cs50.me/checks/8164963ca96b6ee4254991d5585cf70b38f03c51

Any thoughts?

1

Every time you request input, you probably should tell the user that you do, so user knows their input is required to continue.

This could look like

Please enter a number between 0 and 23 (both inclusive): 42
Between 0 and 23, I said.
Try again: 23
...mario pyramid...

or could be completely different. Especially you could have the part printing the prompt within the do..while loop (having same text on re-prompt as on first prompt then, as it's same printf statement).

I guess check50 waits for that output before passing a valid number, and never receives that output, so dies waiting.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .