Re: Need help with a script

microsoftsam203 wrote:

Hello,
Thanks a lot for the help.
I still have some questions.
#Don't get the user input in the function, as doing so will basically cause them to reenter a number every time a program runs
I don't get this. Can you explain why this happens?
The way you coded it... Everytime the code loops, it calls the countdown function. The issue with this is that at the start of the countdown function, it will ask for input, so it will start counting, and imidiately stop because your asking for a new number.

Why does input only work for strings and not for integers? I don't see why input cant work for ints.

The input function just basically makes an input box. As shown @2, it is very easy to convert it to an integer.

Why does it break after it gets to 0? I mean why doesn't it keep printing blastoff!?

I'm not a hundred percent on the syntax for python, but the reason it keeps going is that you call countdown again.

What I would do is put that in a while loop and break after you print blastoff.

Is this forum only for game development or for development in general?

Please elaborate on this question.


Thanks a lot.

-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector
  • ... AudioGames . net Forum — Developers room : redfox via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : pauliyobo via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Ethin via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : redfox via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Ethin via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Ethin via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Munawar via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : microsoftsam203 via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : microsoftsam203 via Audiogames-reflector

Reply via email to