1
Mach4 General Discussion / Script editor strange behavior - or is it me?
« on: February 28, 2020, 02:25:19 PM »
I'm trying to edit my ScreenScript.lua - the below function appears to be missing the declaration for inst and I get a nil error every time the function is called
No problem, I insert the missing line. The editor won't let me save the file, access is denied. So I do a "save as", exit and rename the file.
I check it to make sure my changes are there.
Then I open Mach and to my surprise if I view the screen script the change is not there. If I exit Mach and edit the file again sure enough it is gone.
I must be missing something
function GetFixOffsetVars()
local FixOffset = mc.mcCntlGetPoundVar(inst, 4014)
FixOffset = FixOffset * 10
local PoundVarX = 5221
if (FixOffset < 7) then
PoundVarX = 5221 + ((FixOffset - 1) * 20)
else
PoundVarX = 7001 + ((FixOffset - 7) * 20)
end
PoundVarY = PoundVarX + 1
PoundVarZ = PoundVarX + 2
return PoundVarX, PoundVarY, PoundVarZ
end
No problem, I insert the missing line. The editor won't let me save the file, access is denied. So I do a "save as", exit and rename the file.
I check it to make sure my changes are there.
Then I open Mach and to my surprise if I view the screen script the change is not there. If I exit Mach and edit the file again sure enough it is gone.
I must be missing something
function GetFixOffsetVars()
local FixOffset = mc.mcCntlGetPoundVar(inst, 4014)
FixOffset = FixOffset * 10
local PoundVarX = 5221
if (FixOffset < 7) then
PoundVarX = 5221 + ((FixOffset - 1) * 20)
else
PoundVarX = 7001 + ((FixOffset - 7) * 20)
end
PoundVarY = PoundVarX + 1
PoundVarZ = PoundVarX + 2
return PoundVarX, PoundVarY, PoundVarZ
end