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.

Author
Message
Seb_Lea
14
Years of Service
User Offline
Joined: 13th Dec 2011
Location: Plymouth U.K
Posted: 19th Feb 2013 12:33
Hi,im quite new to DB Professional and was wondering if anyone knew what I was doing wrong here. I want to create a score counter where numbers can be subtracted and added.

SCORE=0

INPUT "Yes or No: ",ans$
IF ans$ ="yes" THEN SCORE=+1
IF ans$ ="no" THEN SCORE=-1
CLS
PRINT SCORE

WAIT KEY
END
TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 19th Feb 2013 13:41


or



TheComet

http://blankflankstudios.tumblr.com/
"You're all wrong. You're all idiots." - Fluffy Rabbit
"Bottom line, people are retarded." - Fluffy Rabbit
Seb_Lea
14
Years of Service
User Offline
Joined: 13th Dec 2011
Location: Plymouth U.K
Posted: 19th Feb 2013 14:17
Thanks for that . 1 more thing . If there was a question where there could only be 1 answer how would I make it so everything was classed as false.
TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 19th Feb 2013 17:17
Probably something like this:



Also, you should try and account for different versions of a question. For example, I could write "yes", "yep", "eeyup", "yeah" or something else. Obses87 wrote a very cool function for this, check it out here : http://forum.thegamecreators.com/?m=forum_view&t=197488&b=10

TheComet

http://blankflankstudios.tumblr.com/
"You're all wrong. You're all idiots." - Fluffy Rabbit
"Bottom line, people are retarded." - Fluffy Rabbit
Libervurto
20
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 19th Feb 2013 20:49 Edited at: 19th Feb 2013 21:01
If you want more than one question have a read of this http://forum.thegamecreators.com/?m=forum_view&t=203625&b=1

Quote: "Obses87"

Ironic you would do that when talking about the Levenshtein function.
I have a feeling the Mr. Levenshtein came up with it because everyone was spelling his name wrong. "Levenstein... close enough."

That function is a good example of doing something relatively complicated with very basic commands. There are so few I will list them: dim, for... next, if... else... endif, len(), mid$() and some arithmetic.

Login to post a reply

Server time is: 2026-07-08 02:17:04
Your offset time is: 2026-07-08 02:17:04