Nah, you've just looked for a solution to a problem that is not what you think it is (, and, with a good writing practice, it's probably not really existant or extremely rare, though hard to nail down). Of course, I might be wrong and I could be suffering from a unique case of
variabilis non-definitio (people who actually know Latin, feel free to slaughter me right now), but here I go:
- Doing an
Code:
(assign, "$var_name", 0),
at script_game_start or in one of the starting menus is completely enough to resolve the situation. Thing is, the compiler thinks you've not defined a variable if you don't explicitly initialise it in a similar manner, because if it's not initialised, I
guess it could
potentially fail to return a correct value if called before being locally set for the current usage cycle (excuse me if I'm extremely incomprehensible, it's past 00:40 around here). For a reference, I'm talking about what happens in every other programming language when you manage to call an "undefined" (I think this was the term) variable - an exception is generated (or your program crashes, depending what you're using and/or doing).
Thinking about this, adding something to the variables.txt could actually be a bad idea, you know, because that may cause the compiler to
think the var is always initialised without it being so, which could result in the aforementioned error raising its filthy head and biting your buttocks when you least expect.
Ninja'd by cmp, and what he says probably means I'm on the right track.
Now excuse me please, ladies and gentlemen, I'm off to get some sleep.