Originally Posted by Iyanga
Your first snippet:
Lua Code:
function toghelm() local control = ZO_OptionsWindow.controlTable[3][8] SetSetting(control.system, control.settingId, (var)) var = x if x == 0 then return nohelm() elseif x == 1 then return helm() end end
There is no x. If there is no x, it is nil. If x is nil, then the comparisons are "nil == 0" which is false and "nil == 1" which is also false. Neither helm() nor norhelm() gets executed.
|
I guess there should be x = var instead of var = x.