DialogueLua.GetTableField and SetTableField methods not working with NLua

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
User avatar
liisi.laasik
Posts: 13
Joined: Tue Oct 03, 2017 9:15 am
Location: Tallinn, Estonia

DialogueLua.GetTableField and SetTableField methods not working with NLua

Post by liisi.laasik »

Hi!

We have decided to test NLua interpreter and made the switch a few days ago. Initial tests are very promising - our Articy import is huge and various Dialogue System operations have sped up considerably.

However the NLua version of DialogueLua class methods GetTableField and SetTableField are respectively not returning or setting any values. As we are using them quite extensively, I would like to know, is there some reasonably easy fix available?
User avatar
Tony Li
Posts: 22062
Joined: Thu Jul 18, 2013 1:27 pm

Re: DialogueLua.GetTableField and SetTableField methods not working with NLua

Post by Tony Li »

Hi,

As soon as I get back from Unite, I'll double check this and make a patch available if necessary.

If you're in a pinch, you can get the field values directly by using Lua.Run(), such as:

Code: Select all

var playerName = Lua.Run("return Actor['Player'].Name").AsString; 
User avatar
liisi.laasik
Posts: 13
Joined: Tue Oct 03, 2017 9:15 am
Location: Tallinn, Estonia

Re: DialogueLua.GetTableField and SetTableField methods not working with NLua

Post by liisi.laasik »

That code worked like a charm. Thanks :)
User avatar
Tony Li
Posts: 22062
Joined: Thu Jul 18, 2013 1:27 pm

Re: DialogueLua.GetTableField and SetTableField methods not working with NLua

Post by Tony Li »

I was unable to reproduce the problem with GetTableField and SetTableField. I did perform some very minor optimization on it after testing. However, if the command above works for your needs, no need to change what you're doing.
Post Reply