AustrianNoob Jetzt weisst du auch nicht weiter oder?
Bei Wiederbelebung kein EQ
-
ZuZu -
29. März 2017 um 17:16 -
Geschlossen -
Erledigt
-
-
Natürlich weiß ich weiter. Ich gehe von einem Error beim Selectieren aus dem Array aus. Typische Fehlermeldung: Error Zero divisor
Höchstwahrscheinlich führt folgendes zum Fehler: _oldGear = [life_corpse] call life_fnc_fetchDeadGear;
Bitte folgende Datein posten:
core/functions/fn_fetchDeadGear.sqf
core/functions/fn_loadDeadGear.sqf
Ps.:
Es ist gibt so eine Sache, wenn man nicht sofort antwortet. Nennt sich Reallife
-
Also gut AustrianNoob
Code
Alles anzeigen#include "..\..\script_macros.hpp" /* File: fn_fetchDeadGear.sqf Author: Bryan "Tonic" Boardwine Description: Fetches gear off of a body. */ private["_primary,_launcher","_handgun","_magazines","_uniform","_vest","_backpack","_items","_primitems","_secitems","_handgunitems","_uitems","_vitems","_bitems","_headgear","_goggles","_unit"]; _unit = [_this,0,ObjNull,[ObjNull]] call BIS_fnc_param; if(isNull _unit) exitWith {}; _primitems = []; _secitems = []; _handgunitems = []; _primary = primaryWeapon _unit; _launcher = secondaryWeapon _unit; _handgun = handGunWeapon _unit; _magazines = []; _uniform = uniform _unit; _vest = vest _unit; _backpack = backpack _unit; _items = assignedItems _unit; if(!(EQUAL(primaryWeapon _unit,""))) then {_primitems = primaryWeaponItems _unit;}; if(!(EQUAL(handgunWeapon _unit,""))) then {_handgunItems = handgunItems _unit;}; _headgear = headgear _unit; _goggles = goggles _unit; _uitems = []; _vitems = []; _bitems = []; if(_uniform != "") then {{_uitems pushBack _x;} foreach (uniformItems _unit);}; if(_vest != "") then {{_vitems pushBack _x;} foreach (vestItems _unit);}; if(_backpack != "") then {{_bitems pushBack _x;} foreach (backPackItems _unit);}; if(!(EQUAL(primaryWeapon _unit,""))) then { _unit selectWeapon (primaryWeapon _unit); if(!(EQUAL(currentMagazine _unit,""))) then { _magazines pushBack currentMagazine _unit; }; }; if(!(EQUAL(secondaryWeapon _unit,""))) then { _unit selectWeapon (secondaryWeapon _unit); if(!(EQUAL(currentMagazine _unit,""))) then { _magazines pushBack currentMagazine _unit; }; }; if(!(EQUAL(handgunWeapon _unit,""))) then { _unit selectWeapon (handgunWeapon _unit); if(!(EQUAL(currentMagazine _unit,""))) 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]; player addItem "ItemMap"; player assignItem "ItemMap"; player addItem "ItemCompass"; player assignItem "ItemCompass"; player addItem "ItemWatch"; player assignItem "ItemWatch"; player addItem "ItemGPS"; player assignItem "ItemGPS";
Code
Alles anzeigen#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 = SEL(_loadout,0); _launcher = SEL(_loadout,1); _handgun = SEL(_loadout,2); _magazines = SEL(_loadout,3); _uniform = SEL(_loadout,4); _vest = SEL(_loadout,5); _backpack = SEL(_loadout,6); _items = SEL(_loadout,7); _primitems = SEL(_loadout,8); _secitems = SEL(_loadout,9); _handgunitems = SEL(_loadout,10); _uitems = SEL(_loadout,11); _vitems = SEL(_loadout,12); _bitems = SEL(_loadout,13); _headgear = SEL(_loadout,14); _goggles = SEL(_loadout,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(!(EQUAL(_uniform,""))) then {_handle = [_uniform,true,false,false,false] spawn life_fnc_handleItem; waitUntil {scriptDone _handle};}; if(!(EQUAL(_vest,""))) then {_handle = [_vest,true,false,false,false] spawn life_fnc_handleItem; waitUntil {scriptDone _handle};}; if(!(EQUAL(_backpack,""))) 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(!(EQUAL(_primary,""))) then {[_primary,true,false,false,false] spawn life_fnc_handleItem;}; if(!(EQUAL(_launcher,""))) then {[_launcher,true,false,false,false] spawn life_fnc_handleItem;}; if(!(EQUAL(_handgun,""))) 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(!(EQUAL(_headgear,""))) then {player addHeadGear _headgear}; if(!(EQUAL(_goggles,""))) then {player addGoggles _goggles}; [player, uniform player] call life_fnc_equipGear;
-
ich schätze es liegt an folgenden Zeilen in der fn_fetchDeadGear.sqf:
Codeplayer addItem "ItemMap"; player assignItem "ItemMap"; player addItem "ItemCompass"; player assignItem "ItemCompass"; player addItem "ItemWatch"; player assignItem "ItemWatch"; player addItem "ItemGPS"; player assignItem "ItemGPS";
Return Value muss soviel ich weiß immer komplett am Ende einer Datei sein.
-
Könntest du es bitte mal genauer beschreiben was ich jetzt tun soll
Die Wiener eben können nix alleine .-.
-
Du musst die letzten 9 Zeilen entfernen. Sodas folgende die letzte Zeile ist:
[_primary,_launcher,_handgun,_magazines,_uniform,_vest,_backpack,_items,_primitems,_secitems,_handgunitems,_uitems,_vitems,_bitems,_headgear,_goggles];
-
Einen Großen DANK an dich! Danke nochmals für deine GEDULT MIT MIR!
-