Hey in this one game im making for fun theres a coin flip in the begging but its not working. I coded it like this.
Code:
input "Heads or tails?(H or T)"; horts$
randomize timer
num = int(rnd * 2) + 1
if horts$ = "H" or horts$ = "h" then
d = 1
b = 0
end if
if horts$ = "t" or horts$ ="T" then
b = 1
d = 0
end if
if num = 1 then d = d + 1
if num = 2 then b = b + 1
if b = d then goto Himfirst
if d > b then goto youfirst
'then the actual game.
Coin flip
Coin flip
Go to my Qbsite its: Trueqb.webs.com
Or if you play nazi zombies go to www.Nazizombys.com and register for cheats, hints, and strategys.
Or if you play nazi zombies go to www.Nazizombys.com and register for cheats, hints, and strategys.
I tested your code and it seemed to work fine for me. Though I'm wondering why you are bothering to figure out which side the player pick it will still have the same probability. Something like this
Code: Select all
DO
INPUT "Heads or tails?(H or T)"; horts$
LOOP UNTIL (LCASE$(horts$) = "h" OR LCASE$(horts$) = "t")
RANDOMIZE TIMER
num = INT(RND * 2) + 1
IF num = 1 THEN GOTO Himfirst
IF num = 2 THEN GOTO youfirst
END
Himfirst:
PRINT "HIM"
END
youfirst:
PRINT "You"
hmm thats weird after i tested and it worked fine thanks anyway though
Go to my Qbsite its: Trueqb.webs.com
Or if you play nazi zombies go to www.Nazizombys.com and register for cheats, hints, and strategys.
Or if you play nazi zombies go to www.Nazizombys.com and register for cheats, hints, and strategys.