Passing a dialogue Variable in the script field

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Timeslip
Posts: 39
Joined: Fri Apr 05, 2019 6:31 am

Passing a dialogue Variable in the script field

Post by Timeslip »

Hi Tony,

Getting a "Code has Syntax error" error, when trying to pass a number try variable from the database to a method. Can you tell me what I'm missing? Thanks!
ScriptField.png
ScriptField.png (2.72 KiB) Viewed 164 times
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: Passing a dialogue Variable in the script field

Post by Tony Li »

Hi,

Use [var=variablename] in text and sequences, but use Variable["variablename"] in Lua code such as Script and Conditions fields:

Code: Select all

StartMoveMapCharacterCoroutine(7, 0, 16, Variable["TempCharacterID"], 0)
Timeslip
Posts: 39
Joined: Fri Apr 05, 2019 6:31 am

Re: Passing a dialogue Variable in the script field

Post by Timeslip »

Thank you!
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: Passing a dialogue Variable in the script field

Post by Tony Li »

Glad to help!
Post Reply