Machsupport Forum
Mach Discussion => Mach4 General Discussion => Topic started by: tbadger on November 01, 2025, 01:49:50 PM
-
Recenlty I've been getting an error when I run the Touch Off UI the second time. It works the first time and after probing Z, I run my program. Then I change the bit and run the Touch Off UI again, but it does not load. I see this error in the UI:
Lua: Error while running chunk
Viewing the log, I see this:
C:\Mach4Hobby\ScreenScript.lua:925: attempt to index a userdata value (global 'Iframe')
stack traceback:
C:\Mach4Hobby\ScreenScript.lua:925: in function 'btnTouch_Left_Up_Script'
This is the Lua code referenced:
function btnTouch_Left_Up_Script(...)
--Touch Button script
if (Iframe == nil) then
--TouchOff module
package.loaded.mcTouchOff = nil
mcTouchOff = require "mcTouchOff"
Iframe = mcTouchOff.Dialog()
else
Iframe:ShowMenu()
Iframe:Raise()
end
I've not made any changes to the screen, modules, or anything else that I'm aware of recently Short of reinstalling Mach 4 and having to reconfigure everything. Any input on why I'm seeing this? I've run it as Administrator and not as Administrator and get the same error and issue. Running on Windows 11.