QB64 Phoenix Edition
Helpppp - Printable Version

+- QB64 Phoenix Edition (https://qb64phoenix.com/forum)
+-- Forum: QB64 Rising (https://qb64phoenix.com/forum/forumdisplay.php?fid=1)
+--- Forum: Code and Stuff (https://qb64phoenix.com/forum/forumdisplay.php?fid=3)
+---- Forum: Help Me! (https://qb64phoenix.com/forum/forumdisplay.php?fid=10)
+---- Thread: Helpppp (/showthread.php?tid=2708)



Helpppp - BloodyHash - 05-19-2024

Okay guys i finally learnt variable i need help just a small help y'all pros xD
ima just show some demo here

HP=100
SP=100

PRINT "A MONSTER HAS APPEAR"
PRINT
PRINT "What would you do"
PRINT
PRINT "1.KICK"
INPUT X

What i want is IF X = 1 i want to clear both of those variable to 0 HP and SP Big Grin


RE: Helpppp - RhoSigma - 05-19-2024

IF X = 1 THEN HP = 0: SP = 0


RE: Helpppp - gaslouk - 05-19-2024

(05-19-2024, 10:01 AM)BloodyHash Wrote: Okay guys i finally learnt variable i need help just a small help y'all pros xD
ima just show some demo here
HP=100
SP=100
PRINT "A MONSTER HAS APPEAR"
PRINT
PRINT "What would you do"
PRINT
PRINT "1.KICK"
INPUT X
What i want is IF X = 1 i want to clear both of those variable to 0 HP and SP Big Grin

IF X = 1 THEN
    HP = 0: PRINT HP
    SP = 0: PRINT SP
ELSE
    PRINT HP, SP
END IF
HI FROM BEAUTIFUL GREECE.

(05-19-2024, 11:22 AM)RhoSigma Wrote: IF X = 1 THEN HP = 0: SP = 0
You caught me RhoSigma


RE: Helpppp - BloodyHash - 05-19-2024

thanks guys