Page 1 of 1

DialogueLua.GetTableField and SetTableField methods not working with NLua

Posted: Tue Oct 03, 2017 9:24 am
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?

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

Posted: Tue Oct 03, 2017 12:02 pm
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; 

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

Posted: Wed Oct 04, 2017 9:49 am
by liisi.laasik
That code worked like a charm. Thanks :)

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

Posted: Sun Oct 08, 2017 10:22 pm
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.