Script with if/then exception
Posted: Wed Nov 18, 2020 1:44 pm
We tried to make script in dialogue a bit more complex (and we don't have any lua experience) and got this error:
Dialogue System: Lua code 'if Variable["TrainStartSequence"] == 0 then Variable["TrainStartSequence"] = 1' threw exception 'Code has syntax errors:
Line 2, Col 1 : Failed to parse Letter of Name.
Line 2, Col 1 : Failed to parse Name of VarName.
Is it possible to use if/then statement in script field? And if it is possible, how to do it properly?
Dialogue System: Lua code 'if Variable["TrainStartSequence"] == 0 then Variable["TrainStartSequence"] = 1' threw exception 'Code has syntax errors:
Line 2, Col 1 : Failed to parse Letter of Name.
Line 2, Col 1 : Failed to parse Name of VarName.
Is it possible to use if/then statement in script field? And if it is possible, how to do it properly?