bnepethomas Posted September 3, 2006 Posted September 3, 2006 Been merrily exporting LUA until upgrading to 1.12a. I did read the config.lua export thing and am allowing export. Basically I am seeing an error on this line socket.try(udp:sendto( StringToSend , ip, port)) Surrounding bits here: dofile "lua.lua" -- The Basic Networking Stuff local host, port = "guagepc", 8080 socket = require("socket") local ip = socket.try(socket.dns.toip(host)) local udp = socket.try(socket.udp()) socket.try(udp:sendto( StringToSend , ip, port)) Any ideas what may have changed in LUA land between 1.1 and 1.12a? Ta Peter
Doug Posted September 3, 2006 Posted September 3, 2006 What's you error ? Check /temp/Error.log LOTATC .NET // LOVICA .NET // 3rd Wing
bnepethomas Posted September 3, 2006 Author Posted September 3, 2006 What's you error ? Check /temp/Error.log Its: LUAExport::LuaExportAfterNextFrame: refused I original thought it could have been an anti-cheat mechanisim kicking in, but now the export just contains (blank modules excluded), if I didn't know better it looks like I've lost a backend LUA macro during the upgrade process. I'd prefer to use UDP instead of TCP, as I can restart the data collection program on the remote computer without having to restart the flight. function LuaExportAfterNextFrame() dofile "lua.lua" local host, port = "guagepc", 8080 socket = require("socket") local ip = socket.try(socket.dns.toip(host)) local udp = socket.try(socket.udp()) local a = "" -- General Aircraft Information local TimeAndPilot = string.format("Modelt =") socket.try(udp:sendto( TimeAndPilot, ip, port)) end Cheers Peter
Doug Posted September 3, 2006 Posted September 3, 2006 I dont't understand why you create a socket at every frame. You just have to do it in loExportStart() one time. Using LuaExportAfterNextFrame is very dangerous. You should use LuaExportActivityNextEvent(). LOTATC .NET // LOVICA .NET // 3rd Wing
bnepethomas Posted September 3, 2006 Author Posted September 3, 2006 I dont't understand why you create a socket at every frame. You just have to do it in loExportStart() one time. Using LuaExportAfterNextFrame is very dangerous. You should use LuaExportActivityNextEvent(). Thanks for the pointer, in the 'real' script I do export based on LuaExportActivityNextEvent. Went back to exporting after everyframe to work out whats happening.
G3 Posted September 7, 2006 Posted September 7, 2006 bump, just wanted to bring this one back to ED's attention. please help if possible, thankyou.
Recommended Posts