Thanks Brian
I don't think its you but more likely my explanation...
Here is a sample of the code it only needs to run once, and the hreg and probestate values global. so i can use anytime..
of course there will be no return's needed
function myZprobe.ConnectedDevice()
local hreg = 0
local ProbeState = 0
local Ereg = mc.mcRegGetHandle(inst,"ESS/Connected")
local Preg = mc.mcRegGetHandle(inst,"PoKeys_40548/DeviceConnected")
if (mc.mcRegGetValue(Preg) == 1) then
hreg = mc.mcRegGetHandle(inst,"PoKeys_40548/ProbeStatus")
ProbeState = -4
return hreg, ProbeState
elseif (mc.mcRegGetValue(Ereg) == 1) then
hreg = mc.mcRegGetHandle(inst,"ESS/Probing_State")
ProbeState = -1
return hreg, ProbeState
end
end
Thanks gary