Ok. I am getting somewhere slowly. I am using some debug output messages to trace the LUA script functionality. For some reason, at least on my system, I need to explicitly define the number variable on both sides of an if statement operator.
For example, this does NOT work:
LTR_Val = GetXin("LTR_Val") --left trigger value 0-255
if LTR_Val > 0 then
mc.mcCntlSetLastError(mInst,"LTR_Val not 0")
elseif LTR_Val == 0 then
mc.mcCntlSetLastError(mInst,"LTR_Val 0")
end
However this DOES work:
LTR_Val = GetXin("LTR_Val") --left trigger value
if tonumber(LTR_Val) > tonumber(0) then
mc.mcCntlSetLastError(mInst,"LTR_Val not 0")
elseif tonumber(LTR_Val) == tonumber(0) then
mc.mcCntlSetLastError(mInst,"LTR_Val 0")
end