1 Attachment(s)
IF...THEN won't let numbers to be summed
Hello,
I can't find out why this doesn't work:
Code:
if mem_l = 2 then speed = speed + 1 : gosub game_speed
while this does:
Code:
if mem_l = 2 then speed = 1 : gosub game_speed
According to the PBP Compiler's manual, both syntax look okay.
When I run my prog with the second example, my Speed VAR will go crazy and show up numbers between 50 and 240(?). Speed is declared as VAR Byte and set to "0" at beginning of prog.
I've attached my code (the concerned lines are labeled 'Set game speed according to level).
Any help is appreciated.