I’m trying to create several *temp variables and show them in the stats screen like this:
Writing: {writing_text} Drawing: {drawing_text}
But it only recognizes the writing_text as a variable and not the drawing_text. Help?
I’m trying to create several *temp variables and show them in the stats screen like this:
Writing: {writing_text} Drawing: {drawing_text}
But it only recognizes the writing_text as a variable and not the drawing_text. Help?
I thought *temps didn’t work in the stats screen? Have you tried making them permanent variables, and seeing if that works?
I got temp variables in my inventory stats screen, so you can due stat screen could be like other scene in many commands. You only have to put *temp file creation inside the stat screen a funny thing is you don’t need put the temp at beginning of stat file, i for instance i got the temp in the middle where my inventory label are
*label inventory
*temp inventory1 “empty”
Yes, sorry my comment wasn’t clear. *temps work in the stats screen, its just they needed to be created in the stats screen, because the stats screen is treated like any other scene file.
@Kermit_Who sorry I can’t help you with your problem, I am still mostly learning choice script.
Could you post the code, it would help track the problem.
The code I’m using to create all the *temp variables:
*temp crawling_text
*if crawling = 0
*set crawling_text “Level 0”
*goto stats
*if crawling = 1
*set crawling_text “Level 1”
*goto stats
*if crawling = 2
*set crawling_text “Level 2”
*goto stats
*if crawling = 3
*set crawling_text “Level 3”
*goto stats
*if crawling = 4
*set crawling_text “Level 4”
*goto stats
*if crawling = 5
*set crawling_text “Level 5”
*goto stats
*if crawling = 6
*set crawling_text “Level 6”
*goto stats
*if crawling = 7
*set crawling_text “Level 7”
*goto stats
*if crawling = 8
*set crawling_text “Level 8”
*goto stats
*if crawling = 9
*set crawling_text “Level 9”
*goto stats
*if crawling = 10
*set crawling_text “Level 10”
*goto stats
*temp walking_text
*if walking = 0
*set walking_text “Level 0”
*goto stats
*if walking = 1
*set walking_text “Level 1”
*goto stats
*if walking = 2
*set walking_text “Level 2”
*goto stats
*if walking = 3
*set walking_text “Level 3”
*goto stats
*if walking = 4
*set walking_text “Level 4”
*goto stats
*if walking = 5
*set crawling_text “Level 5”
*goto stats
*if walking = 6
*set walking_text “Level 6”
*goto stats
*if walking = 7
*set walking_text “Level 7”
*goto stats
*if walking = 8
*set walking_text “Level 8”
*goto stats
*if walking = 9
*set walking_text “Level 9”
*goto stats
*if walking = 10
*set walking_text “Level 10”
*goto stats
*temp writing_text
*if writing = 0
*set writing_text “Level 0”
*goto stats
*if writing = 1
*set writing_text “Level 1”
*goto stats
*if writing = 2
*set writing_text “Level 2”
*goto stats
*if writing = 3
*set writing_text “Level 3”
*goto stats
*if writing = 4
*set writing_text “Level 4”
*goto stats
*if writing = 5
*set writing_text “Level 5”
*goto stats
*if writing = 6
*set writing_text “Level 6”
*goto stats
*if writing = 7
*set writing_text “Level 7”
*goto stats
*if writing = 8
*set writing_text “Level 8”
*goto stats
*if writing = 9
*set writing_text “Level 9”
*goto stats
*if writing = 10
*set writing_text “Level 10”
*goto stats
*temp drawing_text
*if drawing = 0
*set drawing_text “Level 0”
*goto stats
*if drawing = 1
*set drawing_text “Level 1”
*goto stats
*if drawing = 2
*set drawing_text “Level 2”
*goto stats
*if drawing = 3
*set drawing_text “Level 3”
*goto stats
*if drawing = 4
*set drawing_text “Level 4”
*goto stats
*if drawing = 5
*set drawing_text “Level 5”
*goto stats
*if drawing = 6
*set drawing_text “Level 6”
*goto stats
*if drawing = 7
*set drawing_text “Level 7”
*goto stats
*if drawing = 8
*set drawing_text “Level 8”
*goto stats
*if drawing = 9
*set drawing_text “Level 9”
*goto stats
*if drawing = 10
*set drawing_text “Level 10”
*goto stats
And the way I’m displaying it:
Physical
Crawling: ${crawling_text}
\*line_break
Walking: ${walking_text}
Intellectual
Writing: ${writing_text}
\*line_break
Drawing: ${drawing_text}
And I get this error when I go into the stats screen:
Error: choicescript_stats line 154: Non-existent variable ‘walking_text’
Line 154 is the one that says ${walking_text}. I’ve also tryed getting rid of drawing_text, but then only walking_text registers and not the other ones.
(And none of this is in the stat chart, by the way.)
EDIT: All the indenting is also where it should be, but it’s not showing up in the post.
EDIT 2: Found the problem, I was using *if, when I was supposed to use *elseif
I fixed the *if’s to *elseif’s and an *else, but I still get the same error, even when I use the *temp variables on a stat chart.
I think the issue with your use of *goto stats (I’m assuming that *label stats is the section where you display the variables).
The code sets the first variable, crawling_text, and then gets to the *goto statement, and then moves straight to *label stats, without setting any of the other variables.
You need to either not use *goto at all, or have *goto reference the label for the next section (e.g. crawling -> walking -> writing -> drawing -> stats).
It worked! Thank you!