Jump to content
Sign in to follow this  
hellstorm77

pramameter help

Recommended Posts

hi guys im trying to make some prama's for a mission and i keep getting an error do this look right?

my init.sqf

if (PARAMS_VDistance == 1) then { _null = [] execVM "taw_vd\init.sqf"; };
if (PARAMS_PilotsOnly == 1) then { _null = [] execVM "scripts\pilotCheck.sqf"; };
if (PARAMS_SpawnProtection == 1) then { _null = [] execVm "scripts\grenadeStop.sqf"; };

my description.ext

class Params
{
class VDistance
{
 title = "Allow players to change view distance";
 values[] = {1,0};
 texts[] = {"Enabled","Disabled"};
 default = 1;
};

class PilotsOnly
{
 title = "Can only pilots fly";
 values[] = {1,0};
 texts[] = {"Enabled","Disabled"};
 default = 1;
};

    class SpawnProtection
{
 title = "Spawn Protection Zone";
 values[] = {1,0};
 texts[] = {"Enabled","Disabled"};
 default = 1;
};
};

: Error in expression <ect 1;

_obj say [_sound,15];

};

if (PARAMS_VDistance == 1) then { _null = []>

Error position: <PARAMS_VDistance == 1) then { _null = []>

Error

File C:\Users\Liverpool\Documents\Arma 3 Alpha - Other Profiles\Hellstorm77\missions\[dR]_Total_Domination.Stratis\init.sqf, line 92

Share this post


Link to post
Share on other sites

try

if (PARAMSARRAY select 0 == 1) then { _null = [] execVM "taw_vd\init.sqf"; };

Edited by Mikie boy

Share this post


Link to post
Share on other sites

In you init.sqf you'll the following:

if (paramsArray select 0 == 1) then { _null = [] execVM "taw_vd\init.sqf"; };   // VDistance
if (paramsArray select 1 == 1) then { _null = [] execVM "scripts\pilotCheck.sqf"; };   // PilotsOnly
if (paramsArray select 2 == 1) then { _null = [] execVm "scripts\grenadeStop.sqf"; };   // SpawnProtection

All the parameters are available from the paramsArray array and are in the same order as defined in description.ext (starting with 0)

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  

×