Jump to content

Recommended Posts

Posted

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

Posted
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

Posted

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

Posted
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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...