- Jul 3, 2021
- 4,757
- 22,993
Ran into the most common error I keep seeing in visual novels!!! An UNDEFINED variable, unless it is set it to TRUE; he otherwise doesn't do a thing, because after all, the program will switch to ESP mode and read his mind and just KNOW the variable exists!!!
I needed to add in
...to "PatchSG.rpy" because the DEV didn't define a default. Sorry, a tad annoyed that I keep seeing this SAME ERROR in so many VNs!!! The Dev doesn't bother to define the variable unless he sets it to "True" which is bad programming as when you go to test if it is "True", and it was not set, than it is UNDEFINED and the program doesn't know what variable talking about and so it throws an exception!
If you're going to program these things, DEFINE ALL VARIABLES BEFORE YOU USE THEM ONE WAY OR ANOTHER!!! Man... anyhow... I am done ranting. Thank God I know how to program and it was a relatively easy fix FOR ME.
END RANT....
Edited language out. LOL
Update: this SEEMS to be a product of the "reworking my old game" that plagues us all, and seeing as how he redone chapter 1 but not 2 and removed an idea and variable from earlier chapter but didn't search his project for other instances of the variable, this happened. CTRL+SHIFT+F... learn to use it to search your project for other instances of your variable folks, and clean it up properly (if you use the ATOM editor anyhow, which you should).
I needed to add in
Python:
default wingnami = False
If you're going to program these things, DEFINE ALL VARIABLES BEFORE YOU USE THEM ONE WAY OR ANOTHER!!! Man... anyhow... I am done ranting. Thank God I know how to program and it was a relatively easy fix FOR ME.
END RANT....
Edited language out. LOL
Update: this SEEMS to be a product of the "reworking my old game" that plagues us all, and seeing as how he redone chapter 1 but not 2 and removed an idea and variable from earlier chapter but didn't search his project for other instances of the variable, this happened. CTRL+SHIFT+F... learn to use it to search your project for other instances of your variable folks, and clean it up properly (if you use the ATOM editor anyhow, which you should).
Last edited: