*label stat
*choice
#Character_Info
*stat_chart
text Name
text Surname
text Gender
text Class
text Wealth
*goto stat
#Status
*stat_chart
percent Health
percent Strength
percent Leadership
percent Inteligence
percent Charisma
percent Magic
percent Stealth
opposed_pair Strong
Weak
opposed_pair Mercyful
Brutal
*goto stat
*selectable_if (Relationship="true") #Relationship
*stat_chart
percent Shaun
percent Jackson
percent Isaac
percent Kreed
percent Kelly
percent Amber
*goto stat`indent preformatted text by 4 spaces`
*label stat
*choice
#Character_Info
*stat_chart
text Name
text Surname
text Gender
text Class
text Wealth
*goto stat
#Status
*stat_chart
percent Health
percent Strength
percent Leadership
percent Inteligence
percent Charisma
percent Magic
percent Stealth
opposed_pair Strong
Weak
opposed_pair Mercyful
Brutal
*goto stat
*selectable_if (Relationship="true") #Relationship
*stat_chart
percent Shaun
percent Jackson
percent Isaac
percent Kreed
percent Kelly
percent Amber
*goto stat
Sorry sent it twice by mistake
Honestly I don’t see anything wrong
Try indenting the values under the *stat_chart command.
*label stat
*choice
#Character_Info
*stat_chart
text Name
text Surname
text Gender
text Class
text Wealth
*goto stat
#Status
*stat_chart
percent Health
percent Strength
percent Leadership
percent Inteligence
percent Charisma
percent Magic
percent Stealth
opposed_pair Strong
Weak
opposed_pair Mercyful
Brutal
*goto stat
*selectable_if (Relationship="true") #Relationship
*stat_chart
Oh and delete the blank line underneath *stat_chart I don’t think you need it. And make sure you get the first *stat_chart too.
Okay I’m done with my baseline already thanks to your help . . . do you know how to put an inventory in the story? because mine is action based and has many fight scenes that needs the items
Is there a possibility that the quick test is wrong?
Nope. It’s always technically correct. The line number it calls out for the error might not be the line actually causing the error though. It might be a bit before or after that line, or connected to some variable that didn’t get declared properly somewhere before a part of code.
This is a good thread on inventory stuff:
Is it ok if I tag everyone that helped me in my work?
Sorry been so long since i came back to choice script i need help once more.
*label Naming
Let us begin.
We’ll start with your name?
*choice
#Adam
*set name “Adam”
*goto last_name
#Peter
*set name “Peter”
*goto last_name
#Leona
*set name “Leona”
*goto last_name
#April
*set name “April”
*goto last_name
#What the!? those are not my names.
Oh! Please fogive me.
*label input_name
Then what is your name?
*input_text name
*if ("${name}" != "$!{name}")
Your name is $!{name}, is that right?
*choice
#Yes.
*set name "$!{name}"
*goto last_name
#Uhhh, wait, let me try that again.
*goto input_name
whenever i run it it does not go to the “Your name is $!{name}, is that right?” it skips that part and goes directly to creation of last name how can i fix that?
Because the variable contains string that has its first letter capitalized?
If you put, let’s say… “Bob” for example, it won’t go through there. However, using “bob” will lead you through that code you mentioned.
You see, in case of name “bob”…
"${name}" = "bob"
"$!{name}" = "Bob"
and "$!!{name}" = "BOB"
Try replacing *if ("${name}" != "$!{name}")
with *if name != "$!{name}"
Thanks a lot @Szaal it helped me fix my code i hope i can count on you and the others for help in the future
What do you use to separate a story into two parts do you use break or something?
Yup. Just slip the *page_break
command between the parts you want to separate.
This will create a “Next” button in the actual game.
RANDOMTEST FAILED: Error: line 107: Not a number: blah blah what does that mean?
It’s hard to say, without seeing a sample of your code, but I’ve got some guesses that might help you narrow things down a little.
That said, it’s highly likely line 107 is trying to perform a math operation on a variable whose value isn’t numeric. Specifically, if you *create
a variable with the value of "blah blah"
, then accidentally try to add to, subtract from, multiply, or divide it, you’ll get an error that says Error: line [whatever]: Not a number: blah blah
For example, the following code duplicates the error you’re reporting:
*create variable1 "blah blah"
*set variable1 +20
If the variable were created with a different value, you’d get a different error report. For example, the following:
*create variable1 "tall hats"
*set variable1 +5
That will report an error reading line [whatever]: Not a number: tall hats
When Randomtest encounters a text_input command, it always enters ‘blah blah,’ which can easily causes bugs if you’re expecting a specific kind of entry. The simplest way to get around this is to bypass the text_input section by commenting it out, or using *if choice_randomtest
to make Randomtest skip it. This can also cause problems with Quicktest, I believe.