Lua variable error in Quest Giver

Announcements, support questions, and discussion for Quest Machine.
Post Reply
cptscrimshaw
Posts: 113
Joined: Sun Sep 20, 2020 8:21 pm

Lua variable error in Quest Giver

Post by cptscrimshaw »

I found this error a few places on the forum, but wasn't able to find a fix for my particular issue. As you can see in the screenshot, I'm getting the "threw exception 'Lookup of field 'QuestFickleFactionsStart' in the table element failed because the table element itself isn't in the table." error. It appears this is coming from my Quest Giver Offer Lua condition. I've double-checked that everything is spelled correctly.

https://ibb.co/CP3DYST

Interestingly, if I close and reopen unity the error goes away, but then comes back some time (seemingly randomly - even though I'm sure it's not) later at some point.

Ideas on what to check/fix?

Thanks!
User avatar
Tony Li
Posts: 21925
Joined: Thu Jul 18, 2013 1:27 pm

Re: Lua variable error in Quest Giver

Post by Tony Li »

That could happen if the Dialogue System's Lua environment isn't initialized for some reason. Do any errors occur earlier while playing? They might indicate that something is going wrong with the Dialogue System.

Would it be possible for you to send a reproduction project or reproduction steps to tony (at) pixelcrushers.com?
User avatar
Tony Li
Posts: 21925
Joined: Thu Jul 18, 2013 1:27 pm

Re: Lua variable error in Quest Giver

Post by Tony Li »

Thanks for sending the reproduction project. I sent an email reply. To recap:
  • Set the DialogueSystemController.cs script's execution order to -1. (I'll make this change in version 2.2.15 also.)
  • Use the default settings for the Dialogue System Saver component.
Post Reply