• Problem with my code.
    5 replies, posted
When I run my code the command console will come up fine, nut when I put in the correct input and press "enter" the consle closes. Help?
I presume that your code exits after you input something, hence the cmd.exe-Window will be closed. Normally you're supposed to run console programs in a dedicated console instance, but you can work around the auto-closing window by requesting the user to press enter before exiting. In C that'd just be [code]getchar();[/code]
Alright, I'll tell you if that works. [editline]10th October 2013[/editline] No. I guess I should say what language I'm using. I am running a non-gmod Lua script.
I'm honestly not even sure if you're trying to troll right now
An io.read() at the end should do it.
Thanks zeekyhbomb, that worked.
Sorry, you need to Log In to post a reply to this thread.