Visual Novel Framework, bug with loading saves with Lua code
Visual Novel Framework, bug with loading saves with Lua code
I tried using the save system from the Visual Novel Framework for my game, but the problem is that every time I load the game, it does not assign the respected Lua code. It's fine when I'm playing it continuously, the problem only comes when I try to load my saves. What can I do to fix this?
- Attachments
-
- I am assigning them properly here:
- Lua Code Assignment.png (12.86 KiB) Viewed 430 times
-
- Lua Code Bug.png (94.17 KiB) Viewed 430 times
Re: Visual Novel Framework, bug with loading saves with Lua code
Hi,
The error message 'Exception has been thrown by the target of an invocation' means your FadeOut() method or MusicFadeIn() method threw an exception.
To allow the Dialogue System to continue functioning even if a user-registered Lua function fails, it reports this error message and continues, instead of stopping execution in your function.
To identify the issue, enable debugging in your code editor. Put a breakpoint at the beginning of each of those methods. Step through to identify what is causing the exception. It's probably a NullReferenceException. For example, a variable in your class may no longer be valid after loading the saved game.
The error message 'Exception has been thrown by the target of an invocation' means your FadeOut() method or MusicFadeIn() method threw an exception.
To allow the Dialogue System to continue functioning even if a user-registered Lua function fails, it reports this error message and continues, instead of stopping execution in your function.
To identify the issue, enable debugging in your code editor. Put a breakpoint at the beginning of each of those methods. Step through to identify what is causing the exception. It's probably a NullReferenceException. For example, a variable in your class may no longer be valid after loading the saved game.
Re: Visual Novel Framework, bug with loading saves with Lua code
I figured it out!
Thanks tony!
Thanks tony!
Last edited by Kairos on Sun Nov 26, 2023 7:20 am, edited 1 time in total.
Re: Visual Novel Framework, bug with loading saves with Lua code
Glad to help. I'm glad you figured it out!