Page 1 of 1

Element isn't in the table exception

Posted: Mon Feb 27, 2023 8:32 am
by OneManOnMars
I have created a new conversation and suddenly get the following error:

Code: Select all

Dialogue System: Lua code 'Dialog = Conversation[194].Dialog' threw exception 'Lookup of field 'Dialog' in the table element failed because the table element itself isn't in the table.'
UnityEngine.Debug:LogError (object)
PixelCrushers.DialogueSystem.Lua:RunRaw (string,bool,bool) (at Assets/Pixel Crushers/Dialogue System/Scripts/Lua/Lua Wrapper/Lua Interpreter/Lua.cs:219)
PixelCrushers.DialogueSystem.Lua:Run (string,bool,bool) (at Assets/Pixel Crushers/Dialogue System/Scripts/Lua/Lua Wrapper/Lua Interpreter/Lua.cs:120)
PixelCrushers.DialogueSystem.Lua:Run (string) (at Assets/Pixel Crushers/Dialogue System/Scripts/Lua/Lua Wrapper/Lua Interpreter/Lua.cs:139)
PixelCrushers.DialogueSystem.ConversationModel:SetDialogTable (int) (at Assets/Pixel Crushers/Dialogue System/Scripts/MVC/Model/Logic/Model/ConversationModel.cs:318)
PixelCrushers.DialogueSystem.ConversationModel:GetState (PixelCrushers.DialogueSystem.DialogueEntry,bool,bool,bool) (at Assets/Pixel Crushers/Dialogue System/Scripts/MVC/Model/Logic/Model/ConversationModel.cs:230)
PixelCrushers.DialogueSystem.ConversationModel:.ctor (PixelCrushers.DialogueSystem.DialogueDatabase,string,UnityEngine.Transform,UnityEngine.Transform,bool,PixelCrushers.DialogueSystem.IsDialogueEntryValidDelegate,int,bool,bool) (at Assets/Pixel Crushers/Dialogue System/Scripts/MVC/Model/Logic/Model/ConversationModel.cs:127)
PixelCrushers.DialogueSystem.DialogueSystemController:StartConversation (string,UnityEngine.Transform,UnityEngine.Transform,int) (at Assets/Pixel Crushers/Dialogue System/Scripts/Manager/DialogueSystemController.cs:692)
PixelCrushers.DialogueSystem.DialogueManager:StartConversation (string,UnityEngine.Transform,UnityEngine.Transform,int) (at Assets/Pixel Crushers/Dialogue System/Scripts/Manager/DialogueManager.cs:410)
PixelCrushers.DialogueSystem.DialogueSystemTrigger:DoConversationAction (UnityEngine.Transform) (at Assets/Pixel Crushers/Dialogue System/Scripts/Triggers/Triggers/DialogueSystemTrigger.cs:842)
PixelCrushers.DialogueSystem.DialogueSystemTrigger:Fire (UnityEngine.Transform) (at Assets/Pixel Crushers/Dialogue System/Scripts/Triggers/Triggers/DialogueSystemTrigger.cs:613)
PixelCrushers.DialogueSystem.DialogueSystemTrigger:TryStart (UnityEngine.Transform,UnityEngine.Transform) (at Assets/Pixel Crushers/Dialogue System/Scripts/Triggers/Triggers/DialogueSystemTrigger.cs:595)
PixelCrushers.DialogueSystem.DialogueSystemTrigger:TryStart (UnityEngine.Transform) (at Assets/Pixel Crushers/Dialogue System/Scripts/Triggers/Triggers/DialogueSystemTrigger.cs:581)
PixelCrushers.DialogueSystem.DialogueSystemTrigger:OnUse (string) (at Assets/Pixel Crushers/Dialogue System/Scripts/Triggers/Triggers/DialogueSystemTrigger.cs:467)
UnityEngine.SetupCoroutine:InvokeMember (object,string,object)
PixelCrushers.DialogueSystem.Sequencer:HandleSendMessageInternally (string,bool,string[]) (at Assets/Pixel Crushers/Dialogue System/Scripts/MVC/Sequencer/Sequencer.cs:1684)
PixelCrushers.DialogueSystem.Sequencer:HandleCommandInternally (string,string[],single&) (at Assets/Pixel Crushers/Dialogue System/Scripts/MVC/Sequencer/Sequencer.cs:974)
PixelCrushers.DialogueSystem.Sequencer:ActivateCommand (string,string,UnityEngine.Transform,UnityEngine.Transform,string[]) (at Assets/Pixel Crushers/Dialogue System/Scripts/MVC/Sequencer/Sequencer.cs:696)
PixelCrushers.DialogueSystem.Sequencer:CheckQueuedCommands () (at Assets/Pixel Crushers/Dialogue System/Scripts/MVC/Sequencer/Sequencer.cs:796)
PixelCrushers.DialogueSystem.Sequencer:Update () (at Assets/Pixel Crushers/Dialogue System/Scripts/MVC/Sequencer/Sequencer.cs:478)
I don't understand where this is coming from. I can remember having this before but back then I deleted the conversation and created a new one.

This does not work anymore, and I guess it is not the right way to deal with it anyway.

What is going on here? It sounds like the conversation I am triggering (which is working correctly) is not part of the database I am using.

Re: Element isn't in the table exception

Posted: Mon Feb 27, 2023 9:01 am
by Tony Li
Hi,

If you're sure you're using the correct dialogue database, it might have an internal ID conflict. Please run the Unique ID Tool to resolve any ID conflicts. If you're not using SimStatus or [em#] Tag For Old Responses, you can turn off SimStatus and avoid this issue entirely. To turn off SimStatus, untick the Dialogue Manager's Other Settings > Include SimStatus checkbox.

Re: Element isn't in the table exception

Posted: Tue Feb 28, 2023 2:49 am
by OneManOnMars
Hi Tony, thank you for your help.

However, I don't use SimStatus therefore it is already unchecked.
I also tried the Unique ID tool but it did not help either. The error still appears with another Id, however. It is now 495.

In addition, I am not sure if I really can use the ID tool without problems right now, because I have to import translations soon, so I guess the IDs need to stay the same until I have re-imported.

So I have to revert this change.

I do only have one dialogue database so this can't be the problem either.
Do you have any other ideas?

Image

Re: Element isn't in the table exception

Posted: Tue Feb 28, 2023 3:43 am
by OneManOnMars
Sorry, for having a wired fix again here.
I simply did revert the changes I did with the Unique ID tool. After loading the database one more time. The errors simply did not turn up again.

Very strange, but for now I am happy that they are gone.

Re: Element isn't in the table exception

Posted: Tue Feb 28, 2023 7:59 am
by Tony Li
Hi,

Did you test the same conversation? Just want to make sure that conversation is all good.