Qbasicnews.com
May 25, 2020, 11:32:55 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Back to Qbasicnews.com | QB Online Help | FAQ | Chat | All Basic Code | QB Knowledge Base
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: score  (Read 1585 times)
wrath
New Member

Posts: 17



« on: August 17, 2003, 04:01:13 AM »

:evil: i kno im an idiot but how do i put a score thing up i figure that if i put say score% then added a bit on each time it would work but i havnt been able to do the second thing can som1 help :evil:
Logged

evil: tell me if this hurts :evil:
ak00ma
Ancient Guru
****
Posts: 669



« Reply #1 on: August 17, 2003, 04:10:51 AM »

Do you mean a score which increases during playing and then is saved in a file till it's loaded again when the player starts gaming again???
Logged

B 4 EVER
Agamemnus
x/ \z
*****
Posts: 3491



« Reply #2 on: August 17, 2003, 08:12:16 AM »

When I was your age.... I just looked in the QB Help, since there was no qbasicnews.com back thne.......
Logged

Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."

Visit www.neobasic.net to see rubbish in all its finest.
na_th_an
*/-\*
*****
Posts: 8244



WWW
« Reply #3 on: August 17, 2003, 09:02:07 AM »

I looked at the QB help 'cause there wasn't even internet back then Cheesy

http://qbasicnews.com/qboho/
Logged

SCUMM (the band) on Myspace!
ComputerEmuzone Games Studio
underBASIC, homegrown musicians
[img]http://www.ojodepez-fanzine.net/almacen/yoghourtslover.png[/i
whitetiger0990
__/--\__
*****
Posts: 2964



WWW
« Reply #4 on: August 17, 2003, 09:58:35 AM »

like this?
Code:
CLS

DO
LOCATE 1, 5: PRINT score
IF score = 10 THEN PRINT "YOU WIN!"
INPUT a
IF a = INT(RND * 2) + 1 THEN score = score + 1 ELSE score = score - 1
LOOP
Logged


[size=10]Back by popular demand!
I will byte and nibble you bit by bit until nothing remains but crumbs.[/size]
Piptol
Ancient QBer
****
Posts: 422



WWW
« Reply #5 on: August 17, 2003, 10:08:04 AM »

See if you can follow this 'game'. Type 999 to quit.

Code:

DO

  ' This generates some random numbers between 1 and 12 for a% and b%
   a% = INT(RND * 12) + 1
   b% = INT(RND * 12) + 1

   'display the score
   PRINT "Your score:"; score%

   'print the next question
   PRINT a%; "x"; b%;

   'request input for answer
   INPUT "= ", answer%

   'quit on 999
   IF answer% = 999 THEN EXIT DO

   'update the score if correct
   IF answer% = a% * b% THEN score% = score% + 1 'update score

LOOP
Logged

In a world without walls and doors, who needs Windows and Gates?
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!