Page 1 of 1
Issue with Bolt Lua Functions
Posted: Thu May 21, 2020 12:29 am
by mrm1779
Hey all,
I'm getting an error:
Code: Select all
Dialogue System: Lua code 'BoltEvent("shop_NPC", "Test")' threw exception 'Tried to invoke a function call on a non-function value. If you're calling a function, is it registered with Lua?'
I'm not able to find the Dialogue system Bolt Lua component mentioned here:
http://www.pixelcrushers.com/dialogue_s ... /bolt.html
Re: Issue with Bolt Lua Functions
Posted: Thu May 21, 2020 1:00 am
by Tony Li
Hi,
In this folder:
Assets / Plugins / Pixel Crushers / Dialogue System / Third Party Support
you'll find a file named "Bolt Support.unitypackage". Import this into your project. It will add the "Dialogue System Bolt Lua" component to your project.
Re: Issue with Bolt Lua Functions
Posted: Thu Oct 08, 2020 9:44 pm
by Yubaba
I've had a working BoltEvent that with no changes to that Flow will suddenly start throwing the exception error.
I've found if I remove DS Custom Events, Bolt Lua, and the trigger scripts, and add them manually again, it will start working again, but only a few times before going back to the error. Any ideas why?
(As a lurker until this post- super grateful to this forum
)
Re: Issue with Bolt Lua Functions
Posted: Thu Oct 08, 2020 9:59 pm
by Tony Li
Hi,
It's possible that BoltLua is being disabled at some point, possibly if its GameObject is destroyed.
Try adding BoltLua to your Dialogue Manager. You shouldn't need any other instances of BoltLua anywhere else. This should keep the Bolt Lua functions available.
Re: Issue with Bolt Lua Functions
Posted: Thu Oct 08, 2020 10:53 pm
by Yubaba
Oh! Thank you!
(And only after asking this do I realise that I must have skipped over that section in the documentation. So sorry!)
Re: Issue with Bolt Lua Functions
Posted: Fri Oct 09, 2020 9:02 am
by Tony Li
Glad to help!