Explaining Light.VN Error Messages
Archived from Ko-fi, without images
Other Light.VN posts
A translation and commentary of the official wiki page on errors.
As my previous post, this is not a 1:1 translation. I have also added some annotations to the original text.
Light.VN's error messages are quite cryptic and dare I say it a touch intimidating. I hope that this document will give you an easier time parsing what is actually being said.
source: obj is mentioned under [Stack]
source:obj tells you that it occurs on object within quotes (in this case, sysmenu_button6. It's important to check the specific object mentioned, because the main error message (menu_out
does not exist) might be slightly misleading. In this case, the bookmark might have existed, but the error is caused by the button not existing or misbehaving so the jump cannot be successfully resolved.
[CCommandMgr::ExecuteMessageBox] messagebox does not exist
This error occurs when setDialogScript is not specified correctly. This will refer to the file your story script is in. Make sure this is always applied at the beginning of your work to avoid problems, just like setting keybindings to continue your story and activating backlog. If you have set the command and this problem persists, check if the path is correct and the file does exist.
[CCommandMgr::ExecuteVarSet] existing var range:
This error will occur when you have duplicate names for variables. Even if you have both local and global variables, it's a good idea to make sure you name them all differently.
[CCommandMgr::ExecuteVarSet] invalid operation
This error will occur when you attempt to perform a calculation of variables, but the variable itself does not exist. Check whether the variable does exist, and check your spellings when referencing the variable.
[CTextureMgr::getNewResource] loadFromStream FAILED. filepath:~
This one is...quite a lot. It simply tells you that your filepath is wrong. Make sure your asset exists in the correct path and that you are spelling it correctly. Remember, any path from Data should be preceded by a slash (/). Make sure there is no space in the filepath. IMPORTANT: The editor and desktop export of Light.VN can accept filenames and path in the wrong case, but the browser version is case-sensitive! It's a good practice to make sure you write everything down as if everything is case-sensitive, just so you don't have to hunt them down later if you feel like having a web build.
[GotoBookmark]bookmark:~does not exist.restoring script to previous state
Unlike the first error above, this one does not specify an object. This means it's likely that the bookmark itself does not exist or a glitch has caused the jump to be farther than intended. Make sure the file exists, make sure you spell the filename correctly, and make sure you reference the correct point to jump to. Make sure there is no space in the filepath. If everything seems correct, review your jump logic.
[NHelper::concurrentStreamLoader] open stream FAILED.
This also means that your asset is not found. Make sure your asset exists in the correct path and that you are spelling it correctly. Remember, any path from Data should be preceded by a slash (/). Make sure there is no space in the filepath. IMPORTANT: The editor and desktop export of Light.VN can accept filenames and path in the wrong case, but the browser version is case-sensitive! It's a good practice to make sure you write everything down as if everything is case-sensitive, just so you don't have to hunt them down later if you feel like having a web build.
[Parser::GoToScript] FAILED! dest-script:~, dest-bookmark:(could not read text file)
This means the file cannot be found. Make sure the file exists, you spell the filename correctly, and you jump to the correct file. Make sure there is no space in the filepath.
[ResourcePool::getNewResource] loadFromStream FAILED.filepath:~
This means the command you use to declare the asset is incorrect. You may have added more arguments than accepted, you may have missed something, you may have a random space or a stray punctuation, or your asset is entirely wrong. In the case above, the button sound effect (located in the SFX folder) is somehow a PNG image.
attempting to scroll backlog when not initialised
This means the backlog settings have not been loaded. Make sure you declare script backlog.txt log_init at the top of your file (or before anything that would require the backlog). Change the path to wherever your backlog.txt is located! In the 16.6 version, the default would be under Data/plugin/lvui/system/backlog.txt.
This error often occurs when you set your config to be accessible from the game screen without going through the menu screen. As a workaround, in pages.txt, try replacing .Out sysc_.* 300
with .Out sysc.* 300
. Notice the difference in underscore. This will make sure the required settings are not tossed out when you move between screens.
button resource not set
This means a button is missing. If you are modifying the sample template, make sure you don't have partial code hanging around. If you are making a custom screen, make sure your buttons are properly declared.
cannot update animation to idx: 0
This will occur when you try to use an image that has not been declared as an animation as a ctc icon. If you wish to use non-animated ctc, you can declare the same starting and ending image as an animation, and it will be shown as such.
..¥src¥Code¥88..
Any error mentioning src\Code\number is likely to be engine failure. Report this to the developer with detailed descriptions of your platform and situation.
failed to load:
This means the specified file cannot be found. Make sure your asset exists in the correct path and that you are spelling it correctly. Remember, any path from Data should be preceded by a slash (/). Make sure there is no space in the filepath. IMPORTANT: The editor and desktop export of Light.VN can accept filenames and path in the wrong case, but the browser version is case-sensitive! It's a good practice to make sure you write everything down as if everything is case-sensitive, just so you don't have to hunt them down later if you feel like having a web build.
gl error: GL::Renderer::Error::OutOfMemory
Your machine runs out of GPU memory. Close any other GPU-intensive programs (e.g image editors, games, video rendering softwares, ...) and wait until the memory is freed up. You can also consider upgrading your VRAM if problem persists.
invalid calc expression:
Check whether you have used the correct command, reference the variables correctly (and making sure they exist), and the logic is written out clearly (might need to use parentheses for chain of operations). If the error is on asset declaration, check whether you have supplied extraneous argument, missing an argument, or have stray punctuations mixed in.
invalid tokens:
Check your command to make sure whether you have supplied extraneous argument, missing an argument, or have stray punctuations mixed in.
no textbox exists with name:
The textbox you are calling does not exist. Check your spellings and make sure the textbox is declared somewhere. If you're using the default template, make sure textbox.txt is not deleted and it is loaded before your dialogues. If you are making a custom UI, make sure you point to your new textbox (especially if you have deleted the template files).
Parser::ReadScript_Parse breaking.potential infinite loop: readmore than limited line count
This indicates the existence of an infinite loop in your script. You might have a faulty while logic that may send the game into a state it cannot break out from, or jumping recursively. Make sure you are jumping to and from different points.
unmatched line:
This means something is wrong with your story script. Remember, text begins with ". You may have forgotten to start the text after breaking it with ~command, you may have accidentally deleted the ". (this happens more often than you think). First picture is missing " at the start of the text. Second picture is having a stray "/" at the beginning of the text. Third picture has duplicated "~~" at the start of the command.
variable name is of invalid format. name:
To be safe, try not to use special characters in your variable name. Characters like "*" and "." are forbidden because they may interfere with the engine's functions.
xml file(saveDataglobal0xml) could not be saved.
This occurs when you attempt to save on a platform that doesn't support this function (e.g if you are running the game from a Read-Only DVD).
Change "writeDirectoryType="0"" in "settings.xml" to "writeDirectoryType="1"" and save the file. This will allow the game to find a place to save (usually the user's local folder).
Misc. Errors
This occurs because _export is not in the project folder. Check if you have it. If not, copy it from a fresh Light.VN installation. This folder is actually only used for web export, so you can safely delete it from desktop exports.
This occurs when you are trying to call a text file containing only image composition as a script.