Th3-Hunter333 Posted June 3, 2017 Report Share Posted June 3, 2017 Well here i am with a strange client sided error i cant seem to fix regarding spawning randomly on the group in utes, or maybe im blind spawnrandom.sqf attached below // @file Version: 1.0 // @file Name: spawnRandom.sqf // @file Author: [404] Deadbeat, [404] Costlyy // @file Created: 28/11/2012 05:19 // @file Args: waituntil {!isnil "bis_fnc_init"}; private ["_townName","_randomLoc","_pos"]; _randomLoc = cityList select (random (count cityList - 1)); _pos = getMarkerPos (_randomLoc select 0); _pos = [_pos,1,(_randomLoc select 1),1,0,0,0] call BIS_fnc_findSafePos; _pos = [_pos select 0, _pos select 1, (_pos select 2) + 10]; player setPos _pos; respawnDialogActive = false; closeDialog 0; _mins = floor(60 * (daytime - floor(daytime))); _townName = _randomLoc select 2; [ "Wasteland utes",_townName,format ["%1:%3%2", floor(daytime), _mins, if(_mins < 10) then {"0"} else {""}] ] spawn BIS_fnc_infoText; // Check if database loads a spawnposition above 5 meters off ground and if player is losing altitude (falling to death). // Initializing a paradrop at low altitude (100meters) for safe spawning. sleep 0.5; _pAlt = ((getposATL player) select 2); _pVelZ = (velocity player select 2); if ((_pAlt > 5) && (_pVelZ < 0)) then { _chute = "ParachuteG" createVehicle (position player); _chute setPosATL [getPosATL player select 0, getPosATL player select 1, 100]; sleep 0.1; player moveInDriver _chute; 2 cutText ["You logged off mid air. Low altitude paradrop initialized.", "PLAIN DOWN", 2]; //Force 3rd person view at spawning firstperson_allowed = false; while {not firstperson_allowed} do { if(cameraView == "INTERNAL" || cameraView == "GROUP") then { vehicle player switchCamera "EXTERNAL";}; sleep 5; firstperson_allowed = true;}; }; this is the error that it is throwing Error in expression <select 1, (_pos select 2) + 10]; player setPos _pos; respawnDialogActive = fals> Error position: <setPos _pos; respawnDialogActive = fals> Error Type Number, expected Number File mpmissions\__CUR_MP.Utes\client\functions\spawnRandom.sqf, line 16 Link to comment Share on other sites More sharing options...
Question
Th3-Hunter333
Well here i am with a strange client sided error i cant seem to fix regarding spawning randomly on the group in utes, or maybe im blind
spawnrandom.sqf attached below
// @file Version: 1.0
// @file Name: spawnRandom.sqf
// @file Author: [404] Deadbeat, [404] Costlyy
// @file Created: 28/11/2012 05:19
// @file Args:
waituntil {!isnil "bis_fnc_init"};
private ["_townName","_randomLoc","_pos"];
_randomLoc = cityList select (random (count cityList - 1));
_pos = getMarkerPos (_randomLoc select 0);
_pos = [_pos,1,(_randomLoc select 1),1,0,0,0] call BIS_fnc_findSafePos;
_pos = [_pos select 0, _pos select 1, (_pos select 2) + 10];
player setPos _pos;
respawnDialogActive = false;
closeDialog 0;
_mins = floor(60 * (daytime - floor(daytime)));
_townName = _randomLoc select 2;
[
"Wasteland utes",_townName,format ["%1:%3%2", floor(daytime), _mins, if(_mins < 10) then {"0"} else {""}]
] spawn BIS_fnc_infoText;
// Check if database loads a spawnposition above 5 meters off ground and if player is losing altitude (falling to death).
// Initializing a paradrop at low altitude (100meters) for safe spawning.
sleep 0.5;
_pAlt = ((getposATL player) select 2);
_pVelZ = (velocity player select 2);
if ((_pAlt > 5) && (_pVelZ < 0)) then {
_chute = "ParachuteG" createVehicle (position player);
_chute setPosATL [getPosATL player select 0, getPosATL player select 1, 100];
sleep 0.1;
player moveInDriver _chute;
2 cutText ["You logged off mid air. Low altitude paradrop initialized.", "PLAIN DOWN", 2];
//Force 3rd person view at spawning
firstperson_allowed = false;
while {not firstperson_allowed} do {
if(cameraView == "INTERNAL" || cameraView == "GROUP") then {
vehicle player switchCamera "EXTERNAL";};
sleep 5; firstperson_allowed = true;};
};
this is the error that it is throwing
Error in expression <select 1, (_pos select 2) + 10];
player setPos _pos;
respawnDialogActive = fals>
Error position: <setPos _pos;
respawnDialogActive = fals>
Error Type Number, expected Number
File mpmissions\__CUR_MP.Utes\client\functions\spawnRandom.sqf, line 16
Link to comment
Share on other sites
0 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now