DCS.getAvailableSlots(2) returning nil - ED Forums
 


Notices

Reply
 
Thread Tools Display Modes
Old 07-16-2019, 06:38 PM   #1
Kocrachon
Member
 
Kocrachon's Avatar
 
Join Date: Apr 2011
Posts: 138
Default DCS.getAvailableSlots(2) returning nil

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.

Last edited by Kocrachon; 07-16-2019 at 06:51 PM.
Kocrachon is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT. The time now is 01:41 PM. vBulletin Skin by ForumMonkeys. Powered by vBulletin®.
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.