MFiveASP 1 Posted March 25, 2020 Hey. I can’t understand what is wrong with this script? File code/fn__CCheckIfMarkerAllowedSend.sqf Redid it // receives [marker] #include "main.hpp" #define CUT_LAYER 2344223 PV(_mark) = _this select 0; /* if (MAR_CHAN(_mark) in [CHAN_VEHICLE, CHAN_DIRECT]) exitWith {true}; if (MAR_CHAN(_mark) == CHAN_GROUP) exitWith { if (time == 0 || {[] call TFAR_fnc_haveSWRadio}) then { true } else { CUT_LAYER cutText [ localize "STR_Addons__d_map_adv_markers__send_not_allowed_grou_chan", "PLAIN", 0.2, true]; false; }; }; if (MAR_CHAN(_mark) in [CHAN_SIDE, CHAN_COMMAND] ) exitWith { if (time == 0 || {[] call TFAR_fnc_haveLRRadio}) then { true } else { if (MAR_CHAN(_mark) == CHAN_SIDE) then { CUT_LAYER cutText [ localize "STR_Addons__d_map_adv_markers__send_not_allowed_side_chan", "PLAIN", 0.2, true]; } else { CUT_LAYER cutText [ localize "STR_Addons__d_map_adv_markers__send_not_allowed_comm_chan", "PLAIN", 0.2, true]; }; false; }; }; */ if (MAR_CHAN(_mark) == CHAN_GLOBAL) exitWith { CUT_LAYER cutText [ localize "STR_Addons__d_map_adv_markers__send_not_allowed_glob_chan", "PLAIN", 0.2, true]; false; }; true; In it // receives [marker] #include "main.hpp" #define CUT_LAYER 2344223 PV(_mark) = _this select 0; if (MAR_CHAN(_mark) in [CHAN_VEHICLE, CHAN_DIRECT]) exitWith {true}; if (MAR_CHAN(_mark) == CHAN_GROUP) exitWith { if (time == 0 || {[] call TFAR_fnc_haveSWRadio}) then { true } else { CUT_LAYER cutText [ localize "STR_Addons__d_map_adv_markers__send_not_allowed_grou_chan", "PLAIN", 0.2, true]; false; }; }; if (MAR_CHAN(_mark) in [CHAN_SIDE, CHAN_COMMAND] ) exitWith { if (time == 0 || {[] call TFAR_fnc_haveLRRadio}) then { true } else { if (MAR_CHAN(_mark) == CHAN_SIDE) then { CUT_LAYER cutText [ localize "STR_Addons__d_map_adv_markers__send_not_allowed_side_chan", "PLAIN", 0.2, true]; } else { CUT_LAYER cutText [ localize "STR_Addons__d_map_adv_markers__send_not_allowed_comm_chan", "PLAIN", 0.2, true]; }; false; }; }; if (MAR_CHAN(_mark) == CHAN_GLOBAL) exitWith { CUT_LAYER cutText [ localize "STR_Addons__d_map_adv_markers__send_not_allowed_glob_chan", "PLAIN", 0.2, true]; false; }; true; Deleted "/*", because I need so that the markers could not be put without a walkie-talkie, but the script starts to throw an error. https://dropmefiles.com/FN0yB - I changed https://dropmefiles.com/rAYuT - Original Share this post Link to post Share on other sites
MFiveASP 1 Posted March 26, 2020 Can anyone help me with this? Share this post Link to post Share on other sites
Larrow 2822 Posted March 27, 2020 I see no reference to a fn_init in the code provided, although the code has lots of macros/defined variables so who knows. Share this post Link to post Share on other sites