Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Exiting the Game?

Author
Message
ZeroShade
18
Years of Service
User Offline
Joined: 17th Jun 2006
Location:
Posted: 25th Jun 2006 23:17
How would I go about putting up code to ask the user if he/she wants to exit (Y/N) when pushing the escape button?

~Live And Let Learn~
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 26th Jun 2006 01:19 Edited at: 26th Jun 2006 01:33
congrats on wasting 3 whole threads with questions you could answer yourself in minutes by hitting F1 in the editor. how lazy are these people? rhetorical. ignore this and his other 2 posts like i should have.

edit: yah, too harsh, but sheesh. been a rash of the simplest questions lately. trying to keep faith that people still like to learn vs having someone else do everything for them (showing some semblance of initiative, etc).

Virtual Nomad
Athlon XP1800+, Windows XP+SP2, Soyo K7V Dragon+ MB, 1.5Gb 333 RAM, ATI Radeon 8700LT (128Mb)
harggood
21
Years of Service
User Offline
Joined: 9th Apr 2003
Location: the forest
Posted: 26th Jun 2006 01:45
Seems like a reasonable question to me. You would have to "disable escapekey" first. Then you can quit with any key, like "q". For example - If inkey$()="q" then quit=1. If quit=1 gosub Quitit. In Quitit, text to the screen says something like, "Press y if you really want to quit. Press n to continue." If y is pressed then end. If n is pressed then quit=0.

Awfuldark Forest
Laszlo
18
Years of Service
User Offline
Joined: 11th Dec 2005
Location:
Posted: 26th Jun 2006 19:20


I hope it works
Black Mesa
18
Years of Service
User Offline
Joined: 25th Mar 2006
Location:
Posted: 26th Jun 2006 23:39
Dont worry Nomad I agree with you. Zero, you should go through the entire help file and read up on the commands before asking questions. People are very willing to help you tweak your code and help fix errors. But printing text and exiting the game are really basic functions you should be able to figure out by yourself.
Bmad6
19
Years of Service
User Offline
Joined: 25th Aug 2005
Location: Virginia, United States
Posted: 27th Jun 2006 05:22 Edited at: 27th Jun 2006 15:50
Quick note, correction to laszlo's code, I don't think you can use "quit" as a variable name because it's a command...

EDIT: oh, i'm sorry, i got that mixed up, "exit" and "end" are commands, but quit isn't...

RadiusOFT
19
Years of Service
User Offline
Joined: 14th Jul 2005
Location: Aloha, OR(egon)
Posted: 27th Jun 2006 08:31
dude nomad if you dont wanna help people with things they may not know about than why are you even in the newcomers corner. I agree that he could've looked in the help but even then he might not necisarily know where to find what he's lookin for

Do or do not... there is no try -yoda
cats fit best in a george forman - not yoda
Baggers
20
Years of Service
User Offline
Joined: 31st May 2004
Location: Yonder over dem dere hills
Posted: 27th Jun 2006 09:10
He could have used the forum serach, typing in "escape key" or "disable escape key" and low and behold, half the question answered.
It's not over reactibg (though as he admitted a little harshly put) its the rules.

M.I.A is pending
Laszlo
18
Years of Service
User Offline
Joined: 11th Dec 2005
Location:
Posted: 27th Jun 2006 15:38
@Bmad6

I use DBPro and I don't have quit command(exit is a command).
Bmad6
19
Years of Service
User Offline
Joined: 25th Aug 2005
Location: Virginia, United States
Posted: 27th Jun 2006 15:51
I corrected myself above, got confused.

Sorry...

ZeroShade
18
Years of Service
User Offline
Joined: 17th Jun 2006
Location:
Posted: 29th Jun 2006 02:52
I almost feel sorried I asked. I did read a short tutorial on how to make simple applications and its not much harder then java or perl or even visual basic! I just didn't know if there were such a command and even where to find it so I posted thinking it would be faster. Sorry Nomad for learning a language ontop of the many others I am learning but I agree with RadiusOFT. Why are you in the Newcomers if your so much more "skilled" then the rest? Oh, and harggood and Laszlo, thanks for your help!

~Live And Let Learn~
ZeroShade
18
Years of Service
User Offline
Joined: 17th Jun 2006
Location:
Posted: 29th Jun 2006 18:41
btw... nomad, I am not using darkBASIC pro yet, for now i am using the demo... so there is no help... someone like you with all your "skills" should of known this! Tsk tsk. Oh, and sorry about being so harsh! I can't help but make fun of ignorant people.

~Live And Let Learn~

Login to post a reply

Server time is: 2024-11-26 17:36:40
Your offset time is: 2024-11-26 17:36:40