Hey, wir bekommen in letzter Zeit beim Wiederbeleben(dabei ist es egal, ob durch Medic oder InfiStar) diesen einen Fehler:
Code: Clientlogs
20:41:19 Error in expression <_loadout select 0; _launcher = _loadout select 1; _handgun = _loadout select 2; >
20:41:19 Error position: <select 1; _handgun = _loadout select 2; >
20:41:19 Error Nullteiler
20:41:19 File core\functions\fn_loadDeadGear.sqf [life_fnc_loadDeadGear], line 35
An der Datei selbst haben wir nichts geändert, es tauchte einfach irgendwann auf und ging leider nicht mehr weg ![]()
Der Serverlog sagt darüber auch nichts, weswegen wir Ratlos sind und Hilfe benötigen.
Code: fn_loadDeadGear.sqf
#include "..\..\script_macros.hpp"
/*
File: fn_loadDeadGear.sqf
Author: Bryan "Tonic" Boardwine
Description:
BLAH
*/
private ["_allowedItems","_loadout","_primary","_launcher","_handgun","_magazines","_uniform","_vest","_backpack","_items","_primitems","_secitems","_handgunitems","_uitems","_vitems","_bitems","_handle"];
_loadout = [_this,0,[],[[]]] call BIS_fnc_param;
_primary = _loadout select 0;
_launcher = _loadout select 1;
_handgun = _loadout select 2;
_magazines = _loadout select 3;
_uniform = _loadout select 4;
_vest = _loadout select 5;
_backpack = _loadout select 6;
_items = _loadout select 7;
_primitems = _loadout select 8;
_secitems = _loadout select 9;
_handgunitems = _loadout select 10;
_uitems = _loadout select 11;
_vitems = _loadout select 12;
_bitems = _loadout select 13;
_headgear = _loadout select 14;
_goggles = _loadout select 15;
//Strip the unit down
RemoveAllWeapons player;
{player removeMagazine _x;} forEach (magazines player);
removeUniform player;
removeVest player;
removeBackpack player;
removeGoggles player;
removeHeadGear player;
{
player unassignItem _x;
player removeItem _x;
} forEach (assignedItems player);
//Add the gear
if (!(_uniform isEqualTo "")) then {_handle = [_uniform,true,false,false,false] spawn life_fnc_handleItem; waitUntil {scriptDone _handle};};
if (!(_vest isEqualTo "")) then {_handle = [_vest,true,false,false,false] spawn life_fnc_handleItem; waitUntil {scriptDone _handle};};
if (!(_backpack isEqualTo "")) then {_handle = [_backpack,true,false,false,false] spawn life_fnc_handleItem; waitUntil {scriptDone _handle};};
{
_handle = [_x,true,false,false,false] spawn life_fnc_handleItem;
waitUntil {scriptDone _handle};
} forEach _magazines;
if (!(_primary isEqualTo "")) then {[_primary,true,false,false,false] spawn life_fnc_handleItem;};
if (!(_launcher isEqualTo "")) then {[_launcher,true,false,false,false] spawn life_fnc_handleItem;};
if (!(_handgun isEqualTo "")) then {[_handgun,true,false,false,false] spawn life_fnc_handleItem;};
{_handle = [_x,true,false,false,false] spawn life_fnc_handleItem; waitUntil {scriptDone _handle};} forEach _items;
{[_x,true,false,false,true] call life_fnc_handleItem;} forEach (_uitems);
{[_x,true,false,false,true] call life_fnc_handleItem;} forEach (_vitems);
{[_x,true,true,false,false] call life_fnc_handleItem;} forEach (_bitems);
{[_x,true,false,true,false] call life_fnc_handleItem;} forEach (_primitems);
{[_x,true,false,true,false] call life_fnc_handleItem;} forEach (_secitems);
{[_x,true,false,true,false] call life_fnc_handleItem;} forEach (_handgunitems);
if (!(_headgear isEqualTo "")) then {player addHeadGear _headgear};
if (!(_goggles isEqualTo "")) then {player addGoggles _goggles};
Alles anzeigen
Code: fn_fetchDeadGear.sqf
#include "..\..\script_macros.hpp"
/*
File: fn_fetchDeadGear.sqf
Author: Bryan "Tonic" Boardwine
Description:
Fetches gear off of a body.
*/
params [["_unit",objNull,[objNull]]];
if (isNull _unit) exitWith {};
private _dropWeapons = LIFE_SETTINGS(getNumber,"drop_weapons_onDeath");
private _primary = [primaryWeapon _unit, ""] select _dropWeapons;
private _launcher = [secondaryWeapon _unit, ""] select _dropWeapons;
private _handgun = [handGunWeapon _unit, ""] select _dropWeapons;
private _primitems = [];
private _secitems = [];
private _handgunitems = [];
private _magazines = [];
private _uniform = uniform _unit;
private _vest = vest _unit;
private _backpack = backpack _unit;
private _items = assignedItems _unit;
private _headgear = headgear _unit;
private _goggles = goggles _unit;
private _uitems = [];
private _vitems = [];
private _bitems = [];
if !(primaryWeapon _unit isEqualTo "") then {_primitems = primaryWeaponItems _unit;};
if !(handgunWeapon _unit isEqualTo "") then {_handgunItems = handgunItems _unit;};
if !(_uniform isEqualTo "") then {{_uitems pushBack _x; true} count (uniformItems _unit);};
if !(_vest isEqualTo "") then {{_vitems pushBack _x; true} count (vestItems _unit);};
if !(_backpack isEqualTo "") then {{_bitems pushBack _x; true} count (backPackItems _unit);};
if !(primaryWeapon _unit isEqualTo "") then {
_unit selectWeapon (primaryWeapon _unit);
if !(currentMagazine _unit isEqualTo "") then {
_magazines pushBack currentMagazine _unit;
};
};
if !(secondaryWeapon _unit isEqualTo "") then {
_unit selectWeapon (secondaryWeapon _unit);
if !(currentMagazine _unit isEqualTo "") then {
_magazines pushBack currentMagazine _unit;
};
};
if !(handgunWeapon _unit isEqualTo "") then {
_unit selectWeapon (handgunWeapon _unit);
if !(currentMagazine _unit isEqualTo "") then {
_magazines pushBack currentMagazine _unit;
};
};
_unit selectWeapon (primaryWeapon _unit);
if (isNil "_handgunItems") then {_handgunItems = ["","",""];};
[_primary,_launcher,_handgun,_magazines,_uniform,_vest,_backpack,_items,_primitems,_secitems,_handgunitems,_uitems,_vitems,_bitems,_headgear,_goggles];
Alles anzeigen