I present my back for the floggings that will come, but I'm new to C# and writing macros. I have a simple message box macro which only has 11 lines. When I try to run it, errorlog says I have an error in line 18. So how do I use the line numbers to debug my code? I have looked at it carefully, but I must be missing something. The macro and errorlog are attached for those that want to look at it, but my question is with how the compiler numbers lines.
MessageBoxButtons buttons = MessageBoxButtons.YesNo;
DialogResult result = MessageBox.Show("Has probe been removed to a safe location?","Probe SAFE", buttons);
if (result == DialogResult.No) {
exec.Stop();
return;
}
else {
exec.Code("G1 F300 Z20");
While(exec.IsMoving()){}
exec.Wait(1000);
}
UCCNC macro compiler error log file
--------------------------------------
Last error dated: 4/28/2020 4:56:27 PM
In macro: M20004
--------------------------------------
CS1002 | in line: 18 | error text: ; expected
--------------------------------------