and sb is glitched because 0:39 doesn't have ether of those nor a input command any ideas on how to fix this also for those who have been helping me i did some major recoding because i'm new and i found an easy way to do it
its supposed to REPEAT Something UNTIL (whatever happens)
so the 41st should be UNTIL or you can put it anywhere, but its trying to tell you that UNTIL should be in or near the end.
reason why i dont have a$==blah blah is because i tried that once and it triggered a really weird bug that sends one response from one question cuts it then transfers it to another
And none of the ifs will ever run because (example) the string "a" does ot equal "blabla" in [if "a"=="blabla"].
also, string variables should always end in a "$".
ok so dumb question #4 i think idk lost count but is this the proper way for 3 choices or do have to add the whole a==>b or a==c thing also i know the $ symbol is there i'm gonna delete those after (not the ones in the if commands)
Those would work, but probably not the way you intended in this situation. If you're prompting for a choice and you store the user's input in A$, the you need to check each possible value of A$.
IF A$=="explore" THEN ...
IF A$=="rest" THEN ...
IF A$=="eat" THEN ...
If you're providing numbers for action shortcuts such as these.
?"1 - explore"
?"2 - rest"
?"3 - eat"
And allow only numeric input.
INPUT A
You could use IF statements something like this.
IF A==1 THEN...
IF A==2 THEN...
IF A==3 THEN...
It could be something like this.
REPEAT
?"Your options are..."
...
INPUT "Do which action number?",A
IF A=="1" THEN GOTO @EXPLORE
IF A=="2" THEN GOTO @REST
IF A=="3" THEN GOTO @EAT
UNTIL 1
Any non-zero number after the UNTIL forces it to always go back up to the REPEAT. You could achieve the same thing by replacing "REPEAT" with "@label" and "UNTIL" with "GOTO @label".
The lines that print out the options would go below the "your options are" line. What happens when the user selects an option would go after that option's IF ... THEN, or at the label pointed to by the IF ... THEN.
However, this may lead to a very large program. Maybe a better idea would be to map out all the data for each room and write generic functions to present the data and control the flow.
Any text you want to appear on the screen as is, has to be in quotes. If it's not in quotes, letters & words are interpreted as variables and their value (typically zero) will appear.
Sorry, on reviewing my earlier posts I noticed mistakes. Lines where we're checking the value of a numeric variable, like this one here:
IF A=="1" THEN...
should not have quotes around the numbers. They should actually be like this one below.
IF A==1 THEN...
We need quotes only if we're using string variables, like this.
IF A$=="KOALA" THEN...
The lines after 35 look like they'll work fine.
Line 35 itself needs a few minor changes. At the start instead of ? (print), since it's asking for input it should be INPUT
(INPUT will print the message in the quotes.)
Then at the end of the quotes, the variable name should match that which you've used in the IF ... THEN lines after it, so instead of RE$ the variable should be A
ok changed it how exactly do i close the thing though because i tried doing it the way i did for the other ones yet it listed a error (also idk if line 35 is 100% yet or not so i'm also checking for that to)
Except for line 35, it looks like it should be ok. I don't know what your idea is for the storyline, but I'm guessing it's going to branch out, based on each of the three actions, so you might want to add some GOTO statements.
After the print statement's closing quotes.
IF A==4 THEN ?"You follow the white rabbit": GOTO @ForestClearing
IF A==5 THEN ...
...
@ForestClearing
?"You arrive in a forest clearing. A small white rabbit is here. Select 1 to offer a carrot, 2 to play your harp, or 3 to try to catch it with your net."
...
ok scratch that cause i accidentaly found a way to do that with people sending junk to my code my actual problem is separating the answers to the questions because this happens how do i fix this
Think back to the choose-your-own-adventure books. Each @LABEL represents the heading at the top of each chapter. The chapter contains some information about what's happening now. These are your ?"print statements". Then you're given some action options. These are the INPUT"what to do",A statements. Then you're told "If you run away, turn to chapter 73". These are IF A==... GOTO
At the end of each @LABEL block and before the next @LABEL you need some code that'll direct the user to somewhere else. Otherwise they'll fall out of one @LABEL block and into the next. (It's like reading a choose-your-own adventure book through page by page instead of following the instructions.)
ok will add later i do have a beta for this (i'm adding to it right now) i want the beta to be a open beta like what friday the 13th devs did but free but idk how to access sbs is it a member ship thing or something also idk what to add in terms of game play cause idk how to do somethings i want to do (like load a playable map of the town this game takes place in combat system ect) so...