si quelqu'un peut me dire pourquoi le code ci-dessus (rien d'extraordinaire comme code) fonctionne en mode solo, mais provoque une erreur dans le fichier error.log en mode multiplayer (je me mets en mode server et joue une mission)
l'erreur est: (concernant les infos du payload, l'erreur est sur:
local canon = stations.Cannon.shells et sur stations.CurrentStation)
./Config/Export/lod.lua:12: attempt to index local 'stations' (a function value)
ej ne comprends pas ou alors un paramerage à faire différement selon que l'on est en mode multiplayer??
CODE
function LuaExportStart()
local file = io.open("./config/export/lodout.log", "w")
if file then
io.output(file)
end
local stations = LoGetPayloadInfo()
local canon = stations.Cannon.shells
io.write(string.format("Canon = %d \n",canon))
if stations then
io.write(string.format("Current = %d \n",stations.CurrentStation))
io.close()
end
merci de votre aide