Hello Guest it is December 06, 2019, 12:39:11 PM

Author Topic: Lua Error Code on Start up  (Read 204 times)

0 Members and 1 Guest are viewing this topic.

Lua Error Code on Start up
« on: March 03, 2019, 10:47:47 PM »
I was editing a screen set for Mach4 Mill. And now getting an error when I start up. I have tried editing the ScreenScript.lua but have had no success. Figured I better ask for some help before I really screw it bad.

Any help would be greatly appreciated.

I have attached a screenshot of the error and the Screen Scrip lua file

Thanks Jeff
Re: Lua Error Code on Start up
« Reply #1 on: March 03, 2019, 11:00:51 PM »
Hi,
do you recall what it was you edited that caused the fault? If you do there is a way to have Mach open directly
into the screen edit mode which would allow you to correct the mistake.

Does Mach open at all? If it does then go to the screen edit mode and fix it.

How many edits and tweaks have you applied to your screen set and does it have an individualized name?
If your screen set is not overly modified you could load a fresh copy of wx4.set, or whatever the basis of your
screen set is. That should restore it to standard.

Quote
I have tried editing the ScreenScript.lua but have had no success

The ScreenScrpit.lua is not editable. All the separate pieces of editable lua code get gathered together in one big
file, called the ScreenScript.lua. You can view it but not edit it. You must go to each of the different scripts that
make up the overall file if you wish to change something.

Craig
My wife left with my best friend...
     and I miss him!
Re: Lua Error Code on Start up
« Reply #2 on: March 03, 2019, 11:14:45 PM »
Thanks for replying. No I don't remember what I was editing when it happened. But I have made a lot of changes. Mach opens fine after I click ok to the error. I am currently working on a computer that is off line. If I saved the screenset and deleted and re installed  Mach would the error go away?

Jeff
Re: Lua Error Code on Start up
« Reply #3 on: March 03, 2019, 11:23:42 PM »
Hi,
did you create an individualized screen set?

Lets say that your machine requires a screen set with all the facilities of wx4.set say. What you would do is make a copy
of it and rename it to individualize it. Then you use that screen set and any edits, tweaks and additions get applied to it.

Should you create a fault in the screen set from which you cant recover you can load the standard wx4.set which should be
as shipped overwriting the faulty code.

It all depends on whether you created a separate screen set or not. If you didn't you'll have to download Mach4 anew to get a fresh
copy. It will overwite your previous and now faulty wx4.set

Craig
My wife left with my best friend...
     and I miss him!

Offline thosj

*
  •  368 368
    • View Profile
Re: Lua Error Code on Start up
« Reply #4 on: March 03, 2019, 11:58:54 PM »
Did you look around line 702 of screenscript.lua and see if you can figure out where that part of the code came from? Maybe the screen start script or the PLC script? Like Craig said, screenscript.lua is a compliation of eveything, but you can usually figure it out. It might trip your memory as to what you were doing that caused the error. It likely won't point directly to the error causing line, but should give you a clue. On mine around line 702 is the screen start script, but yours might not be. I use Notepad++ to see the line numbers!!

Tom
Re: Lua Error Code on Start up
« Reply #5 on: March 04, 2019, 11:06:53 PM »
Thank you all for the help. I ended up redoing the screenset. It goes much faster the second time around.

Jeff
Re: Lua Error Code on Start up
« Reply #6 on: March 04, 2019, 11:58:13 PM »
Hi,
kool.

Found a video of Daz's that addresses some of the issues you faced:

https://www.machsupport.com/forum/index.php?topic=38826.0

Craig
My wife left with my best friend...
     and I miss him!