Hello Guest it is April 28, 2024, 10:54:36 AM

Author Topic: How do I fix an error that is preventing the screen from loading?  (Read 196 times)

0 Members and 1 Guest are viewing this topic.

I was editing a screen and added a button. I set the click script to call macro 'm500', and typed it in that way. It should be 'm500()'. But now when I load the screen it gives the error:
Lua: Script error during pre compilation
c:\mach4hobby\Screenscript.Lua:861'Syntex error near 'end'

I tried removing the line from Screenscript.lua, (I did remove the read-only status). Saved the file and and verified my change was saved. But when I restart Mach 4 I get the same error, and when I check Screenscript.lua the line with the error is back.

How do I fix this error?

Offline cncmagic

*
  •  63 63
  • what me worry? heck...it ain't my machine anyway
    • View Profile
Re: How do I fix an error that is preventing the screen from loading?
« Reply #1 on: March 10, 2024, 06:57:11 PM »
if you can't fix the error replace the wx4.set file in the screen sub-folder with the original file. That will put all the screen scripts back as they were when you installed. If you've made a lot of modifications they will of course be lost.. usually I save the last screen set file that worked when I start to make changes so if something doesn't work, and won't let Mach4 run, I can at least revert back to the last file that did.  :o
any semblance of information posted to anything remotely  close to accuracy is merely coincidence. Use at you own discretion.. or play the lottery.. same odds
Re: How do I fix an error that is preventing the screen from loading?
« Reply #2 on: March 11, 2024, 12:06:37 PM »
Start mach4 in the screen editing mode.  /e
/e is optional -- start the GUI in screen edit mode.
/f is optional -- start in full screen mode
/m is optional -- remove the menu.
Re: How do I fix an error that is preventing the screen from loading?
« Reply #3 on: March 11, 2024, 06:18:20 PM »
Thank you the /e option worked!

Other than my M code files and other files I've created which file s should I back up?
Re: How do I fix an error that is preventing the screen from loading?
« Reply #4 on: March 18, 2024, 09:18:05 AM »
/e is optional -- start the GUI in screen edit mode.
As stated before this works.

Also if you open the MACH4 loader for the C folder on newer versions you'll see an option for

"Open screen in edit mode"

It should be a checkmark box at the bottom of the loader window.