Jump to content

Recommended Posts

Posted (edited)

Hey all,

 

I am running a MP server and trying to run a script that outputs everything from the getAvailableSlots() command. However, it keeps returning Nil no matter what I feed in.

 

 

 

Example Code

 

server_mission_name = DCS.getMissionName()

available_slots = DCS.getAvailableSlots(1)

available_slots_json = net.lua2json(available_slots)

available_slots2 = DCS.getAvailableSlots(2)

available_slots_json2 = net.lua2json(available_slots2)

 

server_full_file:write("Mission Name\n" .. server_mission_name .."\n")

server_full_file:write("Slot Info\n" .. available_slots_json .."\n")

server_full_file:write("Slot Info\n" .. available_slots_json2 .."\n")

 

When I don't conver the lua2json, I still just get a blank {} table. Where as when I convert them to LUA json, I get a "nil" string.

 

So not sure what I am doing wrong with this command. I have tried feeding the coalition as integers, strings, and even empty. I get no results from my MP server. But I get the mission name just fine. This runs after a player has selected a slot, so it should providing accurate data.

 

 

EDIT:

 

Solved, it wanted red or blue as input, different from what most of the mission scripts want.

Edited by Kocrachon
  • Like 1
  • Recently Browsing   0 members

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