dvader
Wacky Amoebatron
 
Posts: 30
|
Post by dvader on May 4, 2022 14:53:12 GMT
Hi. I am wondering why this little bit of code is printing a totally different message than I want? I am pretty useless with assembly type coding, so can find it hard to suss things sometimes.
IF OBJ=0
GET OBJ
BEEP 40
SCORE 100
SHOWSCORE
ADD 1 TO V
LET LINE = 4
LET COLUMN = 5
PRINT V
DELAY 100
ENDIF
At the minute it works fine for updating score, but no matter what variable I set to count each object, I either get gibberish or a print statement from the end screen. I'm using V here to try to use as a counter but it does the same with all I have tried so far. It's not vital for the game, but nice to see how many items you managed to collect if you beat the game. Just a bit of polish to make it have a better replay value really.
I'm obviously doing something wrong, but no idea what at present. You would think that ADD 1 TO V PRINT V would display 1?
Ok, I've sussed it. Print does not work, but DISPLAY DOUBLEDIGITS V works fine. Phew! Knew it was something silly.
|
|