A little example, if you open up the screen editor and use the dummy button under the DRO`s and add the code
local rc = -3
wx.wxMessageBox(mcErrorCheck[rc])
This will give you the error of "attempt to index global 'mcErrorCheck' (a nil value)"
Now if you use
if (mc.mcInEditor() == 1) then
dofile(mc.mcCntlGetMachDir(0).."\\Modules\\mcErrorCheck.lua") -- use F10 in the debugger for this line to step over it to save debugging the file.
end
local rc = -3
wx.wxMessageBox(mcErrorCheck[rc])
This will work fine, however it is advised you press F10 on the line indicated to save debugging the module too
DazTheGas