Stuck at loading after modifying crashed heli loot

Noster

New Member
I rented a dayz.st server and wanted to add other ArmA 2 OA weapons. I enabled rmod and edited the crashed heli spawn to spawn the weapons I wanted. I get stuck at loading when I try to launch the server, and the only files available to me are the server.pbo and misson.pbo. I was wondering if it was possible to make your own loot spawn, such as the scar, in the dayz.st server?
I went through several tutorials and troubleshoot threads on this and could not find a solution for this specific problem. Any help would be highly appreciated!

The only text I edited was the following from the server.pbo

spawn_heliCrash = {
private["_position","_veh","_num","_config","_itemType","_itemChance","_weights","_index","_iArray"];

waitUntil{!isNil "BIS_fnc_selectRandom"};
if (isDedicated) then {
_position = [getMarkerPos "center",0,4000,10,0,2000,0] call BIS_fnc_findSafePos;
diag_log("DEBUG: Spawning a crashed helicopter at " + str(_position));
_veh = createVehicle ["UH1Wreck_DZ",_position, [], 0, "CAN_COLLIDE"];
dayz_serverObjectMonitor set [count dayz_serverObjectMonitor,_veh];
_veh setVariable ["ObjectID",1,true];
dayzFire = [_veh,2,time,false,false];
publicVariable "dayzFire";
if (isServer) then {
nul=dayzFire spawn BIS_Effects_Burn;
};
_num = round(random 4) + 3;
_config = configFile >> "CfgBuildingLoot" >> "HeliCrash";
_ItemType = [["SCAR_H_CQC_CCO", "weapon"], ["SCAR_H_CQC_CCO_SD", "weapon"], ["M4A1_HWS_GL_SD_Camo", "weapon"], ["M8_carbine", "weapon"], ["SCAR_H_LNG_Sniper", "weapon",], ["SCAR_H_LNG_Sniper_SD", "weapon"], ["BAF_L85A2_RIS_SUSAT", "weapon"], ["M40A3", "weapon"], ["Mk_48_DZ", "weapon"], ["M249_DZ weapon", "weapon"], ["SVD_CAMO", "weapon"], ["M32_EP1", "weapon"], ["MedBox0", "object"] , ["NVGoggles", "weapon"], ["AmmoBoxSmall_556", "object"], ["AmmoBoxSmall_762", "object"], ["Soldier1_DZ", "magazine"], ["Skin_Sniper1_DZ", "magazine"] , ["DZ_Backpack_EP1", "object"]];
//diag_log ("DW_DEBUG: _itemType: " + str(_itemType));
_itemChance = [0.05, 0.05, 0.02, 0.05, 0.05, 0.02, 0.01, 0.02, 0.03, 0.05, 0.01, 0.1, 1, 0.5, 0.1, 0.01, 0.1, 0.1, 0.03];
//diag_log ("DW_DEBUG: _itemChance: " + str(_itemChance));
//diag_log ("DW_DEBUG: (isnil fnc_buildWeightedArray): " + str(isnil "fnc_buildWeightedArray"));

waituntil {!isnil "fnc_buildWeightedArray"};

_weights = [];
_weights = [_itemType,_itemChance] call fnc_buildWeightedArray;
//diag_log ("DW_DEBUG: _weights: " + str(_weights));
for "_x" from 1 to _num do {
//create loot
_index = _weights call BIS_fnc_selectRandom;
sleep 1;
if (count _itemType > _index) then {
//diag_log ("DW_DEBUG: " + str(count (_itemType)) + " select " + str(_index));
_iArray = _itemType select _index;
_iArray set [2,_position];
_iArray set [3,5];
_iArray call spawn_loot;
_nearby = _position nearObjects ["WeaponHolder",20];
{
_x setVariable ["permaLoot",true];
} forEach _nearBy;
};
};
};
};
 
you have 1 too many chance values in your array. I count 19 objects but 20 chance values.
 
only thing I can think of is you may need to unban one of the new items you added. or one of them don't exist. I've ran comparisons on the code and the only changes are in the _ItemType and _itemChance

Or there is a different part of code you changed causing the problem
 
Don't you need to access dayz_weapons.pbo in order to unban weapons? I only have those two .pbo's available. Yeah, that's the only part of the code that changed.
 
I'm only new to Arma's programing So bare with me with how the system works.

Try starting fresh. Remove all the weapons you don't want, then try and boot.
If that works. Progressively add each item to the item pool until you find your problem item.
 
Have a look at the servers RPT, that will tell you what the issue is.

Banned items are in dayz_admin > config.cpp
 
Back
Top