Missing Lua functions

Announcements, support questions, and discussion for Quest Machine.
Post Reply
tootyboi95
Posts: 16
Joined: Wed Sep 29, 2021 1:51 pm

Missing Lua functions

Post by tootyboi95 »

Hi Tony,

I have been enjoying your package alot. I apologize for bombarding you with so many questions; I have been working on the suggestions you have been giving concurrent to these issues that I have been facing. I can't seem to find similar issues in the forum for this particular issue, so here it is.

I am currently using Dialogue System Integration with Quest Machine. It seems like I have been getting this error when I attempted to use some of the Lua functions. This is really weird as I thought that these lua functions should be available as per the documentation given. I have also made sure to follow the tutorial on which gameobjects to attach to the dialogue manager and quest machine gameobjects here . (I.e. 'Common Library Lua' and 'Dialogue System Quest Machine Bridge' on Dialogue manager gameobject, 'Dialogue System Quest Dialogue UI' and 'Dialogue System Quest Alert UI' on Quest Machine Gameobject.)
Dialogue System: Lua code 'SendMessageSystem("Talked", "Girl")' threw exception 'Tried to invoke a function call on a non-function value. If you're calling a function, is it registered with Lua?'
Any thoughts on this? Thanks!
Attachments
lua_func_error.png
lua_func_error.png (734.87 KiB) Viewed 672 times
User avatar
Tony Li
Posts: 21928
Joined: Thu Jul 18, 2013 1:27 pm

Re: Missing Lua functions

Post by Tony Li »

Hi,

When you start the conversation, pause the game. Inspect the Dialogue Manager GameObject, and double check that it has a Common Library Lua component.

Note that the Dialogue Manager GameObject, like the Quest Machine GameObject, survives scene changes. This means the first Dialogue Manager to come into play will stick around and supplant any Dialogue Managers in subsequently loaded scenes. Make sure this first Dialogue Manager has a Common Library Lua component.
tootyboi95
Posts: 16
Joined: Wed Sep 29, 2021 1:51 pm

Re: Missing Lua functions

Post by tootyboi95 »

Hi Tony,

Thanks for the reply. Interestingly, there is a Lua component that persists between scene. I reimported the Dialogue System asset and it finally worked (I might have imported Dialogue System a long time ago). Thanks!
User avatar
Tony Li
Posts: 21928
Joined: Thu Jul 18, 2013 1:27 pm

Re: Missing Lua functions

Post by Tony Li »

I'm glad it's working now!
Post Reply