However, when I run it, it gives me this:
waken line 455: non-existant variable n_troll
As well as this:
waken line 1458 says: non-existent variable ask_v_team
Not sure what’s going on here, and since that doesn’t seem to happen when I put them in permanent variables, I assume it’s something to do with the temps, although I am not sure if I am doing something wrong, or what.
The meetings label is currently at the top of the file. I just wasn’t sure if the page break was messing with it or something, although no matter where I put said, as in the page break and not the temporary variables it still gives me the same error.
If *label meetings, is one that you will be returning to more than once, then it means that cs will run the *temp lines multiple times. Either creating them multiple times, and making them “false”, or just crashing outright. So if you put them above the label, then they will only be created once. Hope this helps.
What I am trying to do, is put all the temp variables at the top of my scene file, although below the star meetings label and then depending on the choices made, set said temp variables as true, and then depending on whether or not X variable is true or not, have a *if block, with various gotos depending on which star if block is triggered. If that makes sense.
If nothing else, I could make them permanent variables, although I would rather not do that as the way it’s looking now my variables are going to be cluttered enough as it is without having to put what are essentially temp variables in there as well.
So basically what I have is the star meetings label at the top of the scene file, and then my page underline break, and then my temp variables, and then the scene itself actually starts.
I am unsure why the temp variables are acting the way they are, as in the game seem to think that they do not exist, as I have set them up, I have checked to make sure that they are spelled the same multiple times, which they are, and yeah. Right now I’ve put a WIP in front of the choices that make the game crash because of the temp variables, although I would very much like to get this fixed as soon as possible.
The way the thing works in this case is, I have a goto to that label, meetings, from a previous scene file, but it’s still not seeing the variables. I even put in some text below, just to make sure that wasn’t the reason, and it’s still acting like the dam variables don’t exist.
Is it necessary to put the *label meetings line before the *temp commands? You could move the *label down to prevent the game from looping (as Loopylazy72 said), and then use *set to change the temp variables afterwards if you need to.
Alternatively you could try putting all the *temp at the very top of the file.
Sometimes, yes. I have found that when you use *goto_scene to jump to a label like: *goto_scene meetings. The *temp needs to be right after that *label or else it does not create the variables because it is skipping the rest of the code to go directly to where it was told to go. Even if the *temp is as the top of the file you would need have the *temp directly under the *label if you are jumping immediately to a *label.
My experience with *temp variables has teach me that every time I “exit” from a scene file it will “uncreate” any temp variable I had run before. And, unless I re-declare each one when I come back to the former scene, the program will act as if these variables doesn’t exist.
The opposite is also valid, I once create a sub routine that “set up” and initialized a bunch of temporary variables for me to use across that same scene, as long as I stay in said scene, the variables continued to be treated as “existent” even after the program had passed by the *return command, as it returned to another part of the same scene file. But if I “exit” the scene f.ex. returning to the startup.txt or any other scene.txt… The program acts as if said *temp variables never existed.
If I am not mistaken, that’s how temp variables are supposed to work.
However, in my case, I am still in the scene when all of this is happening, apart from the *goto_scene, which I just put there for context, and it’s still flagging it as non-existant. Also, I re-wrote the variables to see if that was the reason, and it’s still doing it.