Hi scripting wizards I hope you can help me out on this one.
So, I setup a parachute ammo box drop and everything works fine. The only issue I have now is that I can't move any gear out of that box into the players inventory. Usually I don't ask anything around here and try to solve the problems by myself. But going through all the google searches and the community wiki, I could not figure this one out.
here's the script:
init.sqf :
if (isServer) then {
[] execVM "scripts\supplydrop.sqf";
};
Sometimes I like to think as I started the whole "earplugs" thing.
W0lle: The only advice I can give you is: Do not try to understand BI. You will not succeed and it only makes your brain go boom. I would even go so far and say that not even they understand their own actions :-D.
Nah, I already tried those. It doesn't make a difference. I think it has somthing to do with the fact that the box is beeing spawned in. Maybe... idk :/
Strange, since the addAction did seem work on my dedi server. So you think it's causing the issue with the not beeing able to move gear from the box to my inventory? I'll give it a go and report back asap.
Edit:
Still doesn't let me move gear out of the box. This is the current script setup.
init.sqf:
if (isServer) then {
execVM "scripts\supplydrop.sqf";
};
Yes, it's on a dedicated server. I thought you were on to something and loaded the cba addons onto the server. unfortunately it didn't change anything. This issue is happening when hosting and on the dedicated, so it doesn't appear to be an addons problem.
I removed the addAction command completley in the last script. I can live without it having that. So would it even matter to try the setowner command?
allowdamage true still isn't letting me take items out of the box and when having enableSimulationGlobal on, the entire script isn't getting called out. Not even the playsound, even tho I had enableSimulationGlobal true after the playsound command. So the way I see it, the script should work as it is but it just doesn't? I have a function module, Game Logic and server Game Logic. I'm not useing any addons but yet, no cigar.
I tried the script without setVehicleInit, without processInitCommands, removed the entire while true and the long sleep timer, just to see if it works. Still the same issue. So here is the dedicated server RPT with a few more errors. Ignore the backpack, lootspawn and zeus stuff for now.
Don't mind the **** I made them unrecognizable.
=====================================================================
== C:\TCAFiles\Users\******\*****\arma2oaserver.exe
== ARMA2OASERVER.exe -mod=@cba;@cba_a2;@cba_oa;@zeu_ai; -noPause -name=DefaultServer -profiles=DefaultServer -config=DefaultServer\server.cfg -cfg=DefaultServer\basic.cfg -cpuCount=32 -exThreads=0 -ip=5.9.138.103 -port=2307
=====================================================================
Exe timestamp: 2014/08/11 20:41:32
Current time: 2015/11/25 06:32:05
Version 1.63.125548
Updating base class ->Man, by ca\characters\config.bin/CfgVehicles/CAManBase/
Updating base class ->CAManBase, by ca\characters\config.bin/CfgVehicles/Civilian/
Server error: Player without identity Officer_D (id **********)
Server error: Player without identity Officer_D (id **********)
Server error: Player without identity Officer_D (id **********)
Server error: Player without identity Officer_D (id **********)
Server error: Player without identity Officer_D (id **********)
Server error: Player without identity Officer_D (id **********)
Server error: Player without identity Officer_D (id **********)
Server error: Player without identity Officer_D (id **********)
Server error: Player without identity Officer_D (id **********)
Server error: Player without identity Officer_D (id **********)
Server error: Player without identity Officer_D (id **********)
Server error: Player without identity Officer_D (id **********)
Server error: Player without identity Officer_D (id **********)
Server error: Player without identity Officer_D (id **********)
Server error: Player without identity Officer_D (id **********)
Server error: Player without identity Officer_D (id **********)
Server error: Player without identity Officer_D (id **********)
Server error: Player without identity Officer_D (id **********)
Server error: Player without identity Officer_D (id **********)
Warning: looped for animation: ca\anims\characters\data\anim\sdr\mov\erc\wlk\non\non\amovpercmwlksnonwnondf.rtm differs (looped now 0)! MoveName: amovpercmstpsnonwnondnon_amovpercmstpsraswpstdnon
Warning: looped for animation: ca\anims\characters\data\anim\sdr\mov\erc\wlk\non\non\amovpercmwlksnonwnondf.rtm differs (looped now 1)! MoveName: amovpercmrunsnonwbindf_rfl
[3438,88.215,0,"XEH: PreInit Started. v1.0.0.189. MISSINIT: missionName=PurePVP, worldName=utes, isMultiplayer=true, isServer=true, isDedicated=true"]
[3438,88.884,0,"XEH: PreInit Finished. CACHE DISABLED? (Disable caching with cba_disable_cache.pbo): SLX_XEH_RECOMPILE=false, CBA_COMPILE_RECOMPILE=false, CBA_FUNC_RECOMPILE=false"]
Error in expression < ) exitWith {};
zeu_Null = format["%1", _nullstring];
if(!isServer) exitWith {>
Error position: <_nullstring];
if(!isServer) exitWith {>
Error Undefined variable in expression: _nullstring
File x\zeu\addons\GLx\f\zeu_Init_Unit.sqf, line 20
[3443,95.586,0,"XEH: PostInit Started"]
[3443,95.599,0,"CBA_VERSIONING: cba=1.0.0.190, cba_a2=1.0.0.8, cba_oa=1.0.0.6, "]
[3443,95.615,0,"XEH: PostInit Finished. State: _isClient=false, _isJip=false, _isDedClient=false, _isServer=true, _isDedServer=true, _playerCheckDone=true, _sp=false, _startInitDone=true, _postInitDone=true, _mpRespawn=true, _machineType=0, _sessionId=1, _level=0, _timeOut=false, _game=1, BIS_functions=L 1-1-A:1, group=L 1-1-A"]
Error in expression <cripts\add_backpack.sqf"
_unit = _this select 0;
give_assault = _unit addActio>
Error position: <select 0;
give_assault = _unit addActio>
Error select: Type Object, expected Array,Config entry
File mpmissions\__cur_mp.utes\scripts\add_backpack.sqf, line 2
Error in expression <cripts\add_backpack.sqf"
_unit = _this select 0;
give_assault = _unit addActio>
Error position: <select 0;
give_assault = _unit addActio>
Error select: Type Object, expected Array,Config entry
File mpmissions\__cur_mp.utes\scripts\add_backpack.sqf, line 2
Server: Object 3:4 not found (message 96)
Server: Object 3:5 not found (message 89)
Cannot load sound 'jsrs_smoke\reload.wss'
Cannot load sound 'jsrs_grenade\reload.wss'
Error in expression <rtPos;
sleep 2;
player setPos [getPos this select 0, getPos this select 1, 2];>
Error position: <this select 0, getPos this select 1, 2];>
Error Undefined variable in expression: this
File mpmissions\__cur_mp.utes\scripts\RandomSpawn.sqf, line 11
Error in expression <;
_weaponholder addMagazineCargoGlobal [_mag, floor(random(5))];
_weaponholder s>
Error position: <_mag, floor(random(5))];
_weaponholder s>
Error Undefined variable in expression: _mag
File mpmissions\__cur_mp.utes\scripts\lootSpawn.sqf, line 141
Error in expression <;
_weaponholder addMagazineCargoGlobal [_mag, floor(random(5))];
_weaponholder s>
Error position: <_mag, floor(random(5))];
_weaponholder s>
Error Undefined variable in expression: _mag
File mpmissions\__cur_mp.utes\scripts\lootSpawn.sqf, line 141
Error in expression <;
_weaponholder addMagazineCargoGlobal [_mag, floor(random(5))];
_weaponholder s>
Error position: <_mag, floor(random(5))];
_weaponholder s>
Error Undefined variable in expression: _mag
File mpmissions\__cur_mp.utes\scripts\lootSpawn.sqf, line 141
Error in expression <;
_weaponholder addMagazineCargoGlobal [_mag, floor(random(5))];
_weaponholder s>
Error position: <_mag, floor(random(5))];
_weaponholder s>
Error Undefined variable in expression: _mag
File mpmissions\__cur_mp.utes\scripts\lootSpawn.sqf, line 141
Error in expression <;
_weaponholder addMagazineCargoGlobal [_mag, floor(random(5))];
_weaponholder s>
Error position: <_mag, floor(random(5))];
_weaponholder s>
Error Undefined variable in expression: _mag
File mpmissions\__cur_mp.utes\scripts\lootSpawn.sqf, line 141
Error in expression <;
_weaponholder addMagazineCargoGlobal [_mag, floor(random(5))];
_weaponholder s>
Error position: <_mag, floor(random(5))];
_weaponholder s>
Error Undefined variable in expression: _mag
File mpmissions\__cur_mp.utes\scripts\lootSpawn.sqf, line 141
Error in expression <;
_weaponholder addMagazineCargoGlobal [_mag, floor(random(5))];
_weaponholder s>
Error position: <_mag, floor(random(5))];
_weaponholder s>
Error Undefined variable in expression: _mag
File mpmissions\__cur_mp.utes\scripts\lootSpawn.sqf, line 141
Error in expression <;
_weaponholder addMagazineCargoGlobal [_mag, floor(random(5))];
_weaponholder s>
Error position: <_mag, floor(random(5))];
_weaponholder s>
Error Undefined variable in expression: _mag
File mpmissions\__cur_mp.utes\scripts\lootSpawn.sqf, line 141
Error in expression <;
_weaponholder addMagazineCargoGlobal [_mag, floor(random(5))];
_weaponholder s>
Error position: <_mag, floor(random(5))];
_weaponholder s>
Error Undefined variable in expression: _mag
File mpmissions\__cur_mp.utes\scripts\lootSpawn.sqf, line 141
Error in expression <;
_weaponholder addMagazineCargoGlobal [_mag, floor(random(5))];
_weaponholder s>
Error position: <_mag, floor(random(5))];
_weaponholder s>
Error Undefined variable in expression: _mag
File mpmissions\__cur_mp.utes\scripts\lootSpawn.sqf, line 141
Error in expression <;
_weaponholder addMagazineCargoGlobal [_mag, floor(random(5))];
_weaponholder s>
Error position: <_mag, floor(random(5))];
_weaponholder s>
Error Undefined variable in expression: _mag
File mpmissions\__cur_mp.utes\scripts\lootSpawn.sqf, line 141
Error in expression <;
_weaponholder addMagazineCargoGlobal [_mag, floor(random(5))];
_weaponholder s>
Error position: <_mag, floor(random(5))];
_weaponholder s>
Error Undefined variable in expression: _mag
File mpmissions\__cur_mp.utes\scripts\lootSpawn.sqf, line 141
Error in expression <;
_weaponholder addMagazineCargoGlobal [_mag, floor(random(5))];
_weaponholder s>
Error position: <_mag, floor(random(5))];
_weaponholder s>
Error Undefined variable in expression: _mag
File mpmissions\__cur_mp.utes\scripts\lootSpawn.sqf, line 141
Error in expression <;
_weaponholder addMagazineCargoGlobal [_mag, floor(random(5))];
_weaponholder s>
Error position: <_mag, floor(random(5))];
_weaponholder s>
Error Undefined variable in expression: _mag
File mpmissions\__cur_mp.utes\scripts\lootSpawn.sqf, line 141
Error in expression <;
_weaponholder addMagazineCargoGlobal [_mag, floor(random(5))];
_weaponholder s>
Error position: <_mag, floor(random(5))];
_weaponholder s>
Error Undefined variable in expression: _mag
File mpmissions\__cur_mp.utes\scripts\lootSpawn.sqf, line 141
Error in expression <;
_weaponholder addMagazineCargoGlobal [_mag, floor(random(5))];
_weaponholder s>
Error position: <_mag, floor(random(5))];
_weaponholder s>
Error Undefined variable in expression: _mag
File mpmissions\__cur_mp.utes\scripts\lootSpawn.sqf, line 141
Error in expression <;
_weaponholder addMagazineCargoGlobal [_mag, floor(random(5))];
_weaponholder s>
Error position: <_mag, floor(random(5))];
_weaponholder s>
Error Undefined variable in expression: _mag
File mpmissions\__cur_mp.utes\scripts\lootSpawn.sqf, line 141
Error in expression <;
_weaponholder addMagazineCargoGlobal [_mag, floor(random(5))];
_weaponholder s>
Error position: <_mag, floor(random(5))];
_weaponholder s>
Error Undefined variable in expression: _mag
File mpmissions\__cur_mp.utes\scripts\lootSpawn.sqf, line 141
Error in expression <;
_weaponholder addMagazineCargoGlobal [_mag, floor(random(5))];
_weaponholder s>
Error position: <_mag, floor(random(5))];
_weaponholder s>
Error Undefined variable in expression: _mag
File mpmissions\__cur_mp.utes\scripts\lootSpawn.sqf, line 141
Error in expression <;
_weaponholder addMagazineCargoGlobal [_mag, floor(random(5))];
_weaponholder s>
Error position: <_mag, floor(random(5))];
_weaponholder s>
Error Undefined variable in expression: _mag
File mpmissions\__cur_mp.utes\scripts\lootSpawn.sqf, line 141
Error in expression <[], 500, "FLY"];
chute setPos [(getpos this select 0), (getPos this select 1), >
Error position: <this select 0), (getPos this select 1), >
Error Undefined variable in expression: this
File mpmissions\__cur_mp.utes\scripts\supplydrop.sqf, line 12
Error in expression < ) exitWith {};
zeu_Null = format["%1", _nullstring];
if(!isServer) exitWith {>
Error position: <_nullstring];
if(!isServer) exitWith {>
Error Undefined variable in expression: _nullstring
File x\zeu\addons\GLx\f\zeu_Init_Unit.sqf, line 20
Error in expression < ) exitWith {};
zeu_Null = format["%1", _nullstring];
if(!isServer) exitWith {>
Error position: <_nullstring];
if(!isServer) exitWith {>
Error Undefined variable in expression: _nullstring
File x\zeu\addons\GLx\f\zeu_Init_Unit.sqf, line 20
Error in expression < ) exitWith {};
zeu_Null = format["%1", _nullstring];
if(!isServer) exitWith {>
Error position: <_nullstring];
if(!isServer) exitWith {>
Error Undefined variable in expression: _nullstring
File x\zeu\addons\GLx\f\zeu_Init_Unit.sqf, line 20
Error in expression < ) exitWith {};
zeu_Null = format["%1", _nullstring];
if(!isServer) exitWith {>
Error position: <_nullstring];
if(!isServer) exitWith {>
Error Undefined variable in expression: _nullstring
File x\zeu\addons\GLx\f\zeu_Init_Unit.sqf, line 20
Error in expression < ) exitWith {};
zeu_Null = format["%1", _nullstring];
if(!isServer) exitWith {>
Error position: <_nullstring];
if(!isServer) exitWith {>
Error Undefined variable in expression: _nullstring
File x\zeu\addons\GLx\f\zeu_Init_Unit.sqf, line 20
Error in expression < ) exitWith {};
zeu_Null = format["%1", _nullstring];
if(!isServer) exitWith {>
Error position: <_nullstring];
if(!isServer) exitWith {>
Error Undefined variable in expression: _nullstring
File x\zeu\addons\GLx\f\zeu_Init_Unit.sqf, line 20
Error in expression < ) exitWith {};
zeu_Null = format["%1", _nullstring];
if(!isServer) exitWith {>
Error position: <_nullstring];
if(!isServer) exitWith {>
Error Undefined variable in expression: _nullstring
File x\zeu\addons\GLx\f\zeu_Init_Unit.sqf, line 20
Error in expression < ) exitWith {};
zeu_Null = format["%1", _nullstring];
if(!isServer) exitWith {>
Error position: <_nullstring];
if(!isServer) exitWith {>
Error Undefined variable in expression: _nullstring
File x\zeu\addons\GLx\f\zeu_Init_Unit.sqf, line 20
Error in expression < ) exitWith {};
zeu_Null = format["%1", _nullstring];
if(!isServer) exitWith {>
Error position: <_nullstring];
if(!isServer) exitWith {>
Error Undefined variable in expression: _nullstring
File x\zeu\addons\GLx\f\zeu_Init_Unit.sqf, line 20
Error in expression < ) exitWith {};
zeu_Null = format["%1", _nullstring];
if(!isServer) exitWith {>
Error position: <_nullstring];
if(!isServer) exitWith {>
Error Undefined variable in expression: _nullstring
File x\zeu\addons\GLx\f\zeu_Init_Unit.sqf, line 20
Error in expression < ) exitWith {};
zeu_Null = format["%1", _nullstring];
if(!isServer) exitWith {>
Error position: <_nullstring];
if(!isServer) exitWith {>
Error Undefined variable in expression: _nullstring
File x\zeu\addons\GLx\f\zeu_Init_Unit.sqf, line 20
Error in expression < ) exitWith {};
zeu_Null = format["%1", _nullstring];
if(!isServer) exitWith {>
Error position: <_nullstring];
if(!isServer) exitWith {>
Error Undefined variable in expression: _nullstring
File x\zeu\addons\GLx\f\zeu_Init_Unit.sqf, line 20
Client: Remote object 2:253 not found
Client: Remote object 2:254 not found
Client: Remote object 2:255 not found
Error in expression < ) exitWith {};
zeu_Null = format["%1", _nullstring];
if(!isServer) exitWith {>
Error position: <_nullstring];
if(!isServer) exitWith {>
Error Undefined variable in expression: _nullstring
File x\zeu\addons\GLx\f\zeu_Init_Unit.sqf, line 20
Error in expression < {true} do {
sleep 223;
deleteVehicle utes_btr90;
deleteVehicle utes_btr90_dri>
Error position: <utes_btr90;
deleteVehicle utes_btr90_dri>
Error Undefined variable in expression: utes_btr90
File mpmissions\__cur_mp.utes\spawn_enemy\SpawnAI04.sqf, line 5
Error in expression < ) exitWith {};
zeu_Null = format["%1", _nullstring];
if(!isServer) exitWith {>
Error position: <_nullstring];
if(!isServer) exitWith {>
Error Undefined variable in expression: _nullstring
File x\zeu\addons\GLx\f\zeu_Init_Unit.sqf, line 20
Error in expression < ) exitWith {};
zeu_Null = format["%1", _nullstring];
if(!isServer) exitWith {>
Error position: <_nullstring];
if(!isServer) exitWith {>
Error Undefined variable in expression: _nullstring
File x\zeu\addons\GLx\f\zeu_Init_Unit.sqf, line 20
if (isServer) then {[] execVM "scripts\supplydrop.sqf"};
You should pass parameters in execVM even if empty!
chute setPos [(getpos this select 0), (getPos this select 1), (getPos this select 2)+200];
replace with:
chute setPos [(getpos chute select 0), (getPos chute select 1), (getPos chute select 2)+200];
_weaponholder addMagazineCargoGlobal [_mag, floor(random(5))];
_mag is a local variable and must be define before, in the same scope (script or loop).
Coming from another script, use parameter array: [_mag] execVM ....sqf ; then in ....sqf:
_mag = _this select 0;
then use _mag (recognized yet)
Or, within the same sqf but in a loop, add private "_mag" at top of this file. (declare this local variable)
zeu_Null = format["%1", _nullstring]; ???? what for?
Difficult to debug patchwork of scripts. But try to track each undefined local variable like _variable and apply the "medic" above.
PLEASE CONTACT ME ON BI FORUMS FOR ANY SCRIPT / MOD QUESTION. TKS
I disabled the zeu_ai mod and the weapon spawn script, since they aren't mine. I don't really want to mess around with them yet. However doing the change to the supplydrop.sqf and having the other mod/script disabled, I still get the same issue. The script works but I can't move gear from the box into my inventory.
this is the current RPT. There doesn't seem to be a problem with the supplydrop.sqf
=====================================================================
== C:\TCAFiles\Users\*******\******\arma2oaserver.exe
== ARMA2OASERVER.exe -noPause -name=DefaultServer -profiles=DefaultServer -config=DefaultServer\server.cfg -cfg=DefaultServer\basic.cfg -cpuCount=32 -exThreads=0 -ip=5.9.138.103 -port=2307
=====================================================================
Exe timestamp: 2014/08/11 20:41:32
Current time: 2015/11/25 07:46:48
Version 1.63.125548
Server error: Player without identity Officer_D (id **********)
Server error: Player without identity Officer_D (id **********)
Server error: Player without identity Officer_D (id **********)
...
Warning: looped for animation: ca\anims\characters\data\anim\sdr\mov\erc\wlk\non\non\amovpercmwlksnonwnondf.rtm differs (looped now 1)! MoveName: amovpercmrunsnonwbindf_rfl
Error in expression <cripts\add_backpack.sqf"
_unit = _this select 0;
give_assault = _unit addActio>
Error position: <select 0;
give_assault = _unit addActio>
Error select: Type Object, expected Array,Config entry
File mpmissions\__cur_mp.utes\scripts\add_backpack.sqf, line 2
Error in expression <cripts\add_backpack.sqf"
_unit = _this select 0;
give_assault = _unit addActio>
Error position: <select 0;
give_assault = _unit addActio>
Error select: Type Object, expected Array,Config entry
File mpmissions\__cur_mp.utes\scripts\add_backpack.sqf, line 2
Error in expression <;
_recompile = (count _this) > 0;
if (BIS_fnc_init && !_recompile) exitwith {t>
Error position: <BIS_fnc_init && !_recompile) exitwith {t>
Error Undefined variable in expression: bis_fnc_init
File ca\Modules\Functions\init.sqf, line 28
Server: Object 3:4 not found (message 96)
Server: Object 3:5 not found (message 89)
Cannot load sound 'jsrs_smoke\reload.wss'
Cannot load sound 'jsrs_grenade\reload.wss'
Error in expression <rtPos;
sleep 2;
player setPos [getPos this select 0, getPos this select 1, 2];>
Error position: <this select 0, getPos this select 1, 2];>
Error Undefined variable in expression: this
File mpmissions\__cur_mp.utes\scripts\RandomSpawn.sqf, line 11
and here my script setup:
init.sqf
if (isServer) then {[] execVM "scripts\supplydrop.sqf";};
give_assault = _unit addAction ...
I don't see that in your script but you seems to have problem with player _unit and then addAction can't work.
waitUntil{!(isNil "BIS_MPF_InitDone")};
[nil,nil,rHINT,"Loot Box Drop! Christmas is comming early this year. But be quick, the loot box will despawn in 10 minuets."] call RE;