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 / inkey$() problems

Author
Message
jerseyjew
20
Years of Service
User Offline
Joined: 26th May 2004
Location:
Posted: 27th May 2004 03:37 Edited at: 27th May 2004 04:24
code worked fine until i tried to use this code to exit the program. i keep getting errors in _exitpro:. but when i delete it, wot run the program without the exit program screen, it gives me errors in whatever is the last line. no matter what that line is. i know the coding is probably not the best way to do everything, but im not all that great at Darkbasic, nor do i own the full version(maybe this is the problem?)
i need the most help with _exitpro: the rest i can work out.
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 27th May 2004 03:49 Edited at: 27th May 2004 04:32
if inkey$()> "2" then print "That is not a choice."

try making it

if inkey$()<> "1" AND inkey$()<> "2" then .....


also you are never leaving your loop to get to the subs


* DBP_NETLIB_v1.1 - VB.NET PLUGIN FOR DBP * Click Logo
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 27th May 2004 04:39
I don't know much about DarkBasic Classic but if you are using DBPro use keystate() instead of inkey$() and you can use more than 1 button at a time. Of course you have to look up the scancodes

"People don't fail ..... they stop trying." Specs. P4 2.8GHz 800 FSB | 512MB DDR333
GeForce FX 5200 AGP 256MB | Windows XP Pro Full

Login to post a reply

Server time is: 2024-11-26 18:26:59
Your offset time is: 2024-11-26 18:26:59