Machsupport Forum

Mach Discussion => Mach4 General Discussion => Topic started by: racerron on October 04, 2020, 05:36:27 PM

Title: lua error while running chunk
Post by: racerron on October 04, 2020, 05:36:27 PM
new to this stuff. 490 refers to the word 'buttonEnable'. i tried to deleting the line and the error is still there
Title: Re: lua error while running chunk
Post by: rhtuttle on October 05, 2020, 11:20:06 AM
Does this error occur on startup or when you press the enable button?
Title: Re: lua error while running chunk
Post by: racerron on October 05, 2020, 12:43:09 PM
It does it during startup
Title: Re: lua error while running chunk
Post by: racerron on October 05, 2020, 12:44:47 PM
I have another question I could not seem to get the error message to go away no matter what by changing a few things on the script so my question is should I redownload the whole mach4 in that case I will have to repopulate all my inputs and outputs or is there an easier way to redownload and still save all my settings
Title: Re: lua error while running chunk
Post by: rhtuttle on October 07, 2020, 12:21:23 PM
The ButtonEnable function is defined upon loading and is not related to a specific button but rather checks the 'AxisTable' table for pairs.  I would think that because the function is nil that there is a problem with your install of Mach4 Lua files.  You could copy your current Profile to another directory and reinstall, then copy the profile back and see if you get the same error code.

Did you make any changes to the screen you are working with? 
I assume you have created and are using a new profile based on the mill profile and done the same with the screen set you are using.  If not then installing over the existing ones will negate all changes you have made.

HTH

RT



---------------------------------------------------------------
-- Button Enable function Updated 11-8-2015
---------------------------------------------------------------
function ButtonEnable() --This function enables or disables buttons associated with an axis if the axis is enabled or disabled.

    AxisTable = {