Jump to content

Recommended Posts

Posted

Hello,

 

Nearly all our problems have been solved by now, one thing though, really doesn't seem to work... The Lua exporting...

 

It works, but after a 3 minutes or so, it suddenly stops exporting... If we continue playing after another 3 minutes the host crashes...

 

Is this a known problem ?

Is it our export.lua ?

 

Thx for your answers...

 

our export.lua goes like this:

 

function LuaExportStart()

 

 

dofile "lua.lua"

socket = require("socket")

host = 'XXX.XXX.XXX.XXX'

port = 3245

c = socket.try(socket.connect(host, port)) -- connect to the listener socket

c:setoption("tcp-nodelay",true) -- set immediate transmission mode

end

 

 

function LuaExportBeforeNextFrame()

 

end

 

 

 

function LuaExportAfterNextFrame()

 

end

 

 

 

function LuaExportActivityNextEvent(t)

local tNext = t

 

 

 

local o = LoGetWorldObjects()

 

for k,v in pairs(o) do

socket.try(c:send(string.format("<C>%s</C><M>%s,%s,(%f, %f, %f)</M>\0", v.Name, v.Country, v.Coalition, v.LatLongAlt.Lat, v.LatLongAlt.Long, v.LatLongAlt.Alt)))

 

end

 

tNext = tNext + 2.0

 

 

return tNext

end

 

 

function LuaExportStop()

 

socket.try(c:send("quit")) -- to close the listener socket

c:close()

 

end

 

  • Recently Browsing   0 members

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