Hi,
I don't see any glaring faults that would cause what you describe.
There was a time, a year or so ago when Mach4 adopted the 5.3 version of Lua whereas previously it had used the 5.2 version. There were just enough subtle differences
between 5.2 and 5.3 that some Lua code would not run on the latest Mach build. I've not heard that complaint for some time, but this could be an example of that thing.
What you need to do is run the m6 macro step by step with the ZeroBrane editor and observe the results. It will become obvious which instructions are failing....and that
will inform you as to the corrective solution.
Craig