PLZ HELP!!!! PLEASE!!! ANYONE!!! please help me learn how to make anything, ANYTHING!!! Text based RPG'S Games (mostly) Apps, ANYTHING!!! HELP PLEEEEEASE:_(:_(:_(:_(
INPUT "do you like bananas?";BANANA$
IF BANANA$=="no"THEN PRINT "okay then."
IF BANANA$=="yes"THEN PRINT "I love bananas too!"
INPUT asks a question, here you can only give two answers, yes and no so what this code means is, if you type yes then put i like bananas too! on the screen. But if you type no put okay then on the screen.
SPSET 0,0,0
@MOVE
SPOFS 0,X,Y,-10
B=BUTTON()
IF B AND 1 THEN Y=Y-1
IF B AND 2 THEN Y=Y+1
IF B AND 4 THEN X=X-1
IF B AND 8 THEN X=X-1
GOTO @MOVE
This makes a sprite move
no no no GOTO and labels aren't meant to be used as loops Nate
To make loops it's either
WHILE (statement)
(stuff you want to do for as long as the statement is true)
WEND
or
FOR I=0 TO (amount of times)
(stuff you want to repeat)
NEXT
Anyways uh Adventurer, please read the manual
Nate, the code you wrote:
MON=0
@GO
B=BUTTON()
IF B AND #A THEN MON=MON+1
LOCATE 0,0PRINT MON
GOTO @GO
Most of your code is wrong. Instead, it should be:
MON=0
WHILE 1
VSYNC 1
IF (BUTTON(1) AND 16)!=0 THEN INC MON
LOCATE 0,0:?MON
WEND
Believe me, it'll work a lot better.
WHILE (statement)
(commands)
WEND
If the statement is true, the program will do everything between WHILE and WEND and come back to WHILE. If the statement is false, the program skips everything between WHILE and WEND.
There's also this.
REPEAT
(commands)
UNTIL (statement)
This does the same thing, except it will always run the commands at least once.
SPSET 0,596
WHILE 1
VSYNC 40
SPCHR 0,597
VSYNC 40
SPCHR 0,596
WEND
Please guys, using labels with GOTO is unnecessary.
Also, I'm too lazy to look it up right now, but you could make all of this into one line using SPANIM.