Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - neelst123

Pages: [1]
1
QB64 Discussion / A Rnd bug in qb64 v 1.4
« on: March 25, 2020, 01:29:58 am »
Code: QB64: [Select]
  1. INPUT "What is your name"; name$
  2. PRINT "Hi "; name$
  3. INPUT "Want to play a game (y/n)"; game$
  4. IF game$ = "y" THEN GOTO 2
  5. PRINT ":("
  6. 1 END
  7. 2 PRINT "let the wheel spin!!!"
  8. numa% = INT(RND * 3) + 1
  9. numb% = INT(RND * 3) + 1
  10. numc% = INT(RND * 6) + 1
  11. fnum% = numa% + numb% + numc%
  12. IF fnum% = 1 OR 4 OR 7 OR 10 THEN num% = 1
  13. IF fnum% = 2 OR 5 OR 8 OR 11 THEN num% = 2
  14. IF fnum% = 3 OR 6 OR 9 OR 12 THEN num% = 3
  15. IF num% = 1 GOTO 5 ELSE GOTO 3
  16. 3 IF num% = 2 GOTO 6 ELSE GOTO 4
  17. 4 IF num% = 3 GOTO 7 ELSE GOTO 2
  18. 5 PRINT "you get stone-paper-scissors (with the computer)"
  19. 6 PRINT "hi"
  20. 7 PRINT "yo"
I don't know if it is just me but this always says "yo" for some reason although it is a randomiser. Please tell me if it is a mistake or a bug (or just bad luck I am facing) and if a bug fix t as soon as feasible.

Pages: [1]