Jump to content
Sign in to follow this  
Desrat

Comms menu not working on Dedi Server

Recommended Posts

This is obviously a locality issue as it works fine on a listen server but on the dedi, no dice.

on player init line

null = [] execVM "Support\VOWS_Comms_Menu_Init.sqf";

VOWS_Comms_Menu_Init.sqf

_cas = [player,"VOWS_Support_CAS"] call BIS_fnc_addCommMenuItem;_transport = [player,"VOWS_Support_Transport"] call BIS_fnc_addCommMenuItem;
_ammo = [player,"VOWS_Support_Ammo"] call BIS_fnc_addCommMenuItem;
_vehDrop = [player,"VOWS_Support_Vehicle"] call BIS_fnc_addCommMenuItem;

Description.ext

class cfgCommunicationMenu{
   #include "Support\cfgCommunicationMenu.hpp"
};

cfgCommunicationMenu.hpp

class VOWS_Support_CAS    {
       text = "Air Support"; // Text displayed in the menu and in a notification
       submenu = ""; // Submenu opened upon activation (expression is ignored when submenu is not empty.)
       expression = "['Rotor','CAS'] execFSM 'Support\Support.fsm'"; // Code executed upon activation
       icon = "\a3\Ui_f\data\GUI\Cfg\CommunicationMenu\cas_ca.paa"; // Icon displayed permanently next to the command menu
       cursor = "\a3\Ui_f\data\IGUI\Cfg\Cursors\iconCursorSupport_ca.paa"; // Custom cursor displayed when the item is selected
       enable = "1"; // Simple expression condition for enabling the item
       removeAfterExpressionCall = 0; // 1 to remove the item after calling
   };


class VOWS_Support_Transport
   {
       text = "Call Transport"; // Text displayed in the menu and in a notification
       submenu = ""; // Submenu opened upon activation (expression is ignored when submenu is not empty.)
       expression = "['Rotor','Transport'] execFSM 'Support\Support.fsm'"; // Code executed upon activation
       icon = "\a3\Ui_f\data\GUI\Cfg\CommunicationMenu\transport_ca.paa"; // Icon displayed permanently next to the command menu
       cursor = "\a3\Ui_f\data\IGUI\Cfg\Cursors\iconCursorSupport_ca.paa"; // Custom cursor displayed when the item is selected
       enable = "1"; // Simple expression condition for enabling the item
       removeAfterExpressionCall = 0; // 1 to remove the item after calling
   };
class VOWS_Support_Ammo
   {
       text = "Call Ammo"; // Text displayed in the menu and in a notification
       submenu = ""; // Submenu opened upon activation (expression is ignored when submenu is not empty.)
       expression = "['Fixed','Ammo'] execFSM 'Support\Support.fsm'"; // Code executed upon activation
       icon = "\a3\Ui_f\data\GUI\Cfg\CommunicationMenu\supplydrop_ca.paa"; // Icon displayed permanently next to the command menu
       cursor = "\a3\Ui_f\data\IGUI\Cfg\Cursors\iconCursorSupport_ca.paa"; // Custom cursor displayed when the item is selected
       enable = "1"; // Simple expression condition for enabling the item
       removeAfterExpressionCall = 0; // 1 to remove the item after calling
   };
class VOWS_Support_Vehicle
   {
       text = "Call Vehicle Drop"; // Text displayed in the menu and in a notification
       submenu = ""; // Submenu opened upon activation (expression is ignored when submenu is not empty.)
       expression = "['Fixed','Vehicle'] execFSM 'Support\Support.fsm'"; // Code executed upon activation
       icon = "\a3\Ui_f\data\GUI\Cfg\CommunicationMenu\supplydrop_ca.paa"; // Icon displayed permanently next to the command menu
       cursor = "\a3\Ui_f\data\IGUI\Cfg\Cursors\iconCursorSupport_ca.paa"; // Custom cursor displayed when the item is selected
       enable = "1"; // Simple expression condition for enabling the item
       removeAfterExpressionCall = 0; // 1 to remove the item after calling
   };

When its run exactly like that I get an error

Error in expression <nc_addCommMenuItem_menu",[]];if (count _menu >= 10) exitwith {"Cannot add comm >
 Error position: <_menu >= 10) exitwith {"Cannot add comm >
 Error Undefined variable in expression: _menu
File A3\functions_f\Misc\fn_addCommMenuItem.sqf, line 45

I initially though that maybe the player wasn't initialised yet so added the following to the top of VOWS_Comms_Menu_Init.sqf

{waitUntil{!isNull player};

That stops the error but I still don't get my comms menu. Any ideas guys?

Share this post


Link to post
Share on other sites

waituntil {time > 1};

at the top of the VOWS_Comms_Menu_Init.sqf seems to have fixed it

Share this post


Link to post
Share on other sites

Sure I'll put a repro together and post it later.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×