Forum Jump :

Author Message


Posts: 55
Rank:


Level: Member

Country: de
Location: Hamburg
Occupation:
Age: 20
In-game name: Nerodenecro

 
#1 Posted at 2016-01-19 15:28        
     
Hey guys,

so I'm using the Script for Loadouts which I've always been using.
Ok, for sure it's like 2 Months ago, probaly changed something, that's why I come to you.

So this is my Units Init(No Error Message).
_null = [this, 1, 0.05, 2] execVM "heal.sqf"; 0 = [] execVM "player_markers.sqf"; null = [this] execVM "Leader.sqf";  this addeventhandler ["respawn","_this execVM 'Leader.sqf'"];

Here is the Script folded in the "Leader.sqf".(Error Message)
waitUntil {!isNull player};
_unit = _this select 0;

removeAllWeapons this;
removeAllItems this;
removeAllAssignedItems this;
removeUniform this;
removeVest this;
removeBackpack this;
removeHeadgear this;
removeGoggles this;

_unit forceAddUniform "U_B_CTRG_3";
_unit addItemToUniform "10Rnd_338_Mag";
for "_i" from 1 to 3 do {_unit addItemToUniform "11Rnd_45ACP_Mag";};
_unit addVest "V_PlateCarrierL_CTRG";
for "_i" from 1 to 9 do {_unit addItemToVest "10Rnd_338_Mag";};
_unit addItemToVest "11Rnd_45ACP_Mag";
_unit addBackpack "B_AssaultPack_rgr";
_unit addItemToBackpack "MineDetector";
for "_i" from 1 to 5 do {_unit addItemToBackpack "FirstAidKit";};
for "_i" from 1 to 7 do {_unit addItemToBackpack "10Rnd_338_Mag";};
_unit addHeadgear "H_HelmetSpecB_paint1";
_unit addGoggles "G_Balaclava_combat";

_unit addWeapon "srifle_DMR_02_camo_F";
_unit addPrimaryWeaponItem "muzzle_snds_338_black";
_unit addPrimaryWeaponItem "acc_pointer_IR";
_unit addPrimaryWeaponItem "optic_AMS";
_unit addPrimaryWeaponItem "bipod_01_F_blk";
_unit addWeapon "hgun_Pistol_heavy_01_F";
_unit addHandgunItem "muzzle_snds_acp";
_unit addHandgunItem "optic_MRD";
_unit addWeapon "Rangefinder";

_unit linkItem "ItemMap";
_unit linkItem "ItemCompass";
_unit linkItem "ItemWatch";
_unit linkItem "ItemRadio";
_unit linkItem "ItemGPS";
_unit linkItem "NVGoggles";
if(true) exitWith{};

Custom Loadout Script by pickinthatbanjo Video Link

Error Message Screenshot

If the Image doesn't work Link to the Picture


Author Message


Posts: 1589
Rank:


Level: Member

Country: pf
Location: Tahiti
Occupation: too many Arma
Age: 57
In-game name: Kobayashi Maru

 
#2 Posted at 2016-01-19 15:58        
     
Not so dofficult: you might have change _unit for this in a copy/paste
previously
removeAllWeapons this;
removeAllItems this;
removeAllAssignedItems this;
removeUniform this;
removeVest this;
removeBackpack this;
removeHeadgear this;
removeGoggles this;
was in init field of the unit, and now, you should write:
removeAllWeapons _unit;
removeAllItems _unit;
removeAllAssignedItems this;
removeUniform _unit;
removeVest _unit;
removeBackpack _unit;
removeHeadgear _unit;
removeGoggles _unit;
to make it work.

PLEASE CONTACT ME ON BI FORUMS FOR ANY SCRIPT / MOD QUESTION. TKS

Advertisement


Author Message


Posts: 55
Rank:


Level: Member

Country: de
Location: Hamburg
Occupation:
Age: 20
In-game name: Nerodenecro

 
#3 Posted at 2016-01-19 16:06        
     
Hey Pierre,

well. None of this was in the Init of my Unit(s).

Only this:
_null = [this, 1, 0.05, 2] execVM "heal.sqf"; 0 = [] execVM "player_markers.sqf"; null = [this] execVM "Leader.sqf";  this addeventhandler ["respawn","_this execVM 'Leader.sqf'"];

Never used "remove" stuff in Init. Doesn't work on respawn.

Nvm. changed it in the Script. Works fine now.
Thanks mate.