Code:
if con == nil then
function CallBack(Param1, Param2, Param3, Param4, Param5)
print("called back:")
print(Param1)
print(Param2)
print(Param3)
print(Param4)
print(Param5)
end
con = comserv.NewConnection( '192.168.0.25', 20005, 'girder', CallBack);
con = con:SendEvent('comtest',200,1,'a','b',nil,'d')
else
con = con:SendEvent('comtest',200,1,'a','b',nil,'d')
end
Code:
[string "D:\Vidcap G4.GML:\Comservertest\Comserverte..."]:16: attempt to index global `con' (a number value)
stack traceback:
[string "D:\Vidcap G4.GML:\Comservertest\Comserverte..."]:16: in main chunk
Never said I was smart...