Hello Guest it is April 28, 2024, 10:34:45 AM

Author Topic: List of Mach4 error codes  (Read 4612 times)

0 Members and 1 Guest are viewing this topic.

List of Mach4 error codes
« on: December 09, 2017, 05:49:24 PM »
Can someone point me to a list of the error codes?  I'm getting a -2 as a return code and it doesn't match up with the api examples listed

Offline Chaoticone

*
  • *
  •  5,624 5,624
  • Precision Chaos
    • View Profile
Re: List of Mach4 error codes
« Reply #1 on: December 09, 2017, 07:19:24 PM »
Have a look at the mcErrorCheck.lua module in your modules directory.
;D If you could see the things I have in my head, you would be laughing too. ;D

My guard dog is not what you need to worry about!
Re: List of Mach4 error codes
« Reply #2 on: December 10, 2017, 02:42:31 AM »
Hi,
kool, I never knew that was there.

I've made a Notepad document of them and put a copy in the Docs folder of Mach4 so that its ready to hand when coding.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'

Offline Chaoticone

*
  • *
  •  5,624 5,624
  • Precision Chaos
    • View Profile
Re: List of Mach4 error codes
« Reply #3 on: December 10, 2017, 10:03:54 AM »
Hey Craig, there is rarely a reason to need the list. The reason the module was added was to make it easier to check error codes. I did a post on that somewhere. Will see if I can find it.
;D If you could see the things I have in my head, you would be laughing too. ;D

My guard dog is not what you need to worry about!

Offline Chaoticone

*
  • *
  •  5,624 5,624
  • Precision Chaos
    • View Profile
Re: List of Mach4 error codes
« Reply #4 on: December 10, 2017, 10:35:33 AM »
I'm not 100% sure and can't check it right now but pretty sure I added the mcErrorCheck module to the hobby installer and also added the bit to load it to the default hobby screens screen load scripts as well as the default profiles load modules macro (so it can be used in mCodes) a while back. Anyway, the attached zip file has it all including an example macro of how it was meant to be used. Hope this helps.
« Last Edit: December 10, 2017, 10:40:51 AM by Chaoticone »
;D If you could see the things I have in my head, you would be laughing too. ;D

My guard dog is not what you need to worry about!
Re: List of Mach4 error codes
« Reply #5 on: December 10, 2017, 11:14:59 AM »
Hi,
sometimes when debugging if you hover over a return code it displays a number. Nice to be able to know what condition that number represents.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'

Offline Chaoticone

*
  • *
  •  5,624 5,624
  • Precision Chaos
    • View Profile
Re: List of Mach4 error codes
« Reply #6 on: December 10, 2017, 02:13:22 PM »
Yup, that would make the list handy.
;D If you could see the things I have in my head, you would be laughing too. ;D

My guard dog is not what you need to worry about!

Offline DazTheGas

*
  •  778 778
  • DazTheGas
    • View Profile
Re: List of Mach4 error codes
« Reply #7 on: December 10, 2017, 05:23:40 PM »
The ErrorCheck Module is already loaded via the Screen Load Script so can be used globally during normal use, however from the debugger you dont have access to whats declared in the script so you will have to load the module perhaps by adding

if (mc.mcInEditor() == 1) then
-- load the package here
end

DazTheGas
New For 2022 - Instagram: dazthegas
Re: List of Mach4 error codes
« Reply #8 on: December 10, 2017, 05:33:45 PM »
Hi Daz,
hadn't really considered using it in that manner, more as a reference so that if I get a return code from an API call
of -9 say, I can look it up to decide if remedial action is required.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'

Offline Chaoticone

*
  • *
  •  5,624 5,624
  • Precision Chaos
    • View Profile
Re: List of Mach4 error codes
« Reply #9 on: December 10, 2017, 08:01:55 PM »
The ErrorCheck Module is already loaded via the Screen Load Script so can be used globally during normal use

DazTheGas

Interesting Daz. I was definitely told different but never tested just loading in the screen load script or not that I remember testing at least. Do you know if it has always been this way? Was a while back when I was messing with it.
;D If you could see the things I have in my head, you would be laughing too. ;D

My guard dog is not what you need to worry about!