Thanks
That seems to stop the null error, But if i run a G31 after the if statement and then do a mc.mcRegGetValue(hreg) to see if the probe was not hit, the pokeys should return a -4 and the ESS should return a -1 not hit, it always returns a 0.0 if probe not hit, if i remove the if statement and other code, and only have hreg = mc.mcRegGetHandle(inst,"PoKeys_40548/ProbeStatus"). then G31, and then get the value from hreg, it works fine returns the correct values..
Not really sure where the problem is, a lua bug?
Thanks gary