Question about invalid temp variables

So. I have a slight problem, and am unsure on what to do about it.
Right now? I have 2 temp variables:

*temp flirt_t_shigh false
*temp flirt_t_bold false

However, when I run through my code, I keep getting "scout line 1848: non-existant variable flirt_t_bold
Same thing for flirt_t_shigh, but different lines. Unsure what’s going on with this. Could anyone give me a second opinion?
Also, on a somewhat unrelated note. Anyone else getting a notification when trying to reply on Ultimate newbe codeing about not being able to put down more than 2 replies? That’s what I’m getting, and can’t figure out how to get rid of it. I’m just writeing 1 thing, by the way. Anyway.

Just to clear the obvious stuff out: temp variables only work in the scene they are declared. So you’re calling them in the same scene right?

2 Likes

You have 2 *temp variables, but your code is probably not reaching them. Try putting all your *temp commands to the top of your file, to the starting line and see how it goes.

4 Likes

Yeah, they are in the same scene. Also, moved most of my temps to the top. Granted, I have it, right now where you jump streight to the lable you want, which is below the temps themselves, but in the choises provided, you can select them true or not, and it’s still giving the same arror. Non-existant variable react_t_shigh.
Flipped the temp wording aroud for asthetic reasons, but did so for both. Last time something like this happened, I swapped them into permanint variables, though I do not want to do that here, since these decissions, as of right now, have no mager repracussions on the story, apart from relationships and stats.

Right now, all the temps, there are about 17 of them, if that matters, are just below the first lable of the scene. I assume this has to do with the temp locations, cause I switched a few, altered the words, switched the types. Still says non-existant variable, so I suspect it has to do with the root temp location.

This seems to be the problem. In addition that the temp variables only work in the scene they’re declared, those variables need to be reached for them to 'exist’.

When you jump around with *goto and *label, make sure the game reach where you create the temp variables.

2 Likes

Make double sure that you don’t have a *goto_scene or *gosub_scene in the chapter, or in another chapter that refers to this one, or that you move across chapter boundaries.

4 Likes

Seems to be fixed now. Yeah, I had it jumping from the first scene to the second scene, how to swap it so that now the game runs for the temp variables. Didn’t know that was a thing, thought they worked more like permanent variables. Thanks. :slight_smile:

This topic was automatically closed 24 hours after the last reply. If you want to reopen your WiP, contact the moderators.