Indent your code and don't forget about AND! For example: change
WHILE 1
VSYNC
IF DAY==1 THEN
IF ROOM==3 THEN
PRINT "HI"
ENDIF
ENDIF
FOR I=0 TO 9
LOCATE I,I:?I
NEXT
WEND
Don't worry, things are improving. Initially, I wrote RGRPG2 as a joke, but I'm actually putting more effort into commenting and cleaning the code this time. All the assets: sprite sheets, backgrounds, dialog, enemies, aren't going away. I'm just rewriting the engine.
Also, I have moved away from text boxes made of text! Now they're text on top of graphics drawn on the fly. More info soon...
Try using coordinates relative to the fish instead of absolute coordinates.
DEF SPICHK
DCHK=BGGET(2,X,Y+7,1)
UCHK=BGGET(2,X,Y-7,1)
LCHK=BGGET(2,X-7,Y,1)
RCHK=BGGET(2,X+7,Y,1)
IF DCHK==128 || UCHK==128 || LCHK==128 || RCHK==128 THEN HIT 1
END
X and Y are your fish's X and Y coordinates.
RGRPG2 devlog: restart! This time, I'm going to actually write down what I want to do beforehand, rather than have feature creep happen.
Key for unfinished 10 map trash edition: [QRY34XVD]
rip caret12 and v360calc, they were rebooted but never released
RGRPG2 devlog: Fixed a bunch of lag and added a bit more polish. There are secrets now! This game is confirmed to be really, great, of the roleplaying genre, and a game.
This will constantly put "Message!" on the screen.
WHILE and WEND are the start and end of a WHILE loop. WHILE takes a condition to check every time it repeats, but TRUE just makes it repeat forever.
But wait: how do you stop a program stuck in an infinite loop?! Just use the START button again.
If you want to save a program you made, just hold down L (or R) and tap SAVE.
Hope this helped!
This code will ask for your name and repeat it back to you.
INPUT shows a message and saves whatever you type to N$ and
PRINT shows a message and the name you typed.
You just made your first(?) program! Of course, there's much more you can do with SmileBASIC. Ex: if you wanted to fill the screen with a message, you just need to put this code into the editor:
WHILE TRUE
PRINT "message! ";
WEND
If you press the blue EDIT button on the keyboard in the bottom left corner, you'll switch to edit mode. This is where you can write code to run with the START button.
Try writing this code:
INPUT "What's your name?",N$
PRINT "Hello, ";N$
Then press START to run the code.