Issue with Bolt Lua Functions

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
mrm1779
Posts: 4
Joined: Mon May 18, 2020 12:08 am

Issue with Bolt Lua Functions

Post 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
User avatar
Tony Li
Posts: 22051
Joined: Thu Jul 18, 2013 1:27 pm

Re: Issue with Bolt Lua Functions

Post 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.
Yubaba
Posts: 38
Joined: Thu Oct 08, 2020 9:37 pm

Re: Issue with Bolt Lua Functions

Post 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 🙏)
User avatar
Tony Li
Posts: 22051
Joined: Thu Jul 18, 2013 1:27 pm

Re: Issue with Bolt Lua Functions

Post 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.
Yubaba
Posts: 38
Joined: Thu Oct 08, 2020 9:37 pm

Re: Issue with Bolt Lua Functions

Post 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!)
User avatar
Tony Li
Posts: 22051
Joined: Thu Jul 18, 2013 1:27 pm

Re: Issue with Bolt Lua Functions

Post by Tony Li »

Glad to help!
Post Reply