Forum Jump :

Author Message


Posts: 2
Rank:


Level: Member

Country: us
Location:
Occupation:
Age: 33
In-game name: Townailz

 
#1 Posted at 2015-04-23 22:56        
     
This is the Helibot v1.5

the RPT Error is this Any help would be appreciated

count nearestObjects [player, ["Land_HelipadCi>
Error position: <nearestObjects [player, ["Land_HelipadCi>
Error 0 elements provided, 3 expected
File mpmissions\__cur_mp.Stratis\scripts\helipadInit.sqf, line 10
Bad conversion: array
Error in expression <While{true} do {
waituntil
{


Original script is here


While{true} do {
waituntil
{


//======ADD OR REMOVE CLASSNAMES HERE TO DECIDE WHICH HELIPADS WILL REFUEL/REPAIR/REARM============
//===========5]>0 MEANS YOU NEED TO BE LESS THAN 5M AWAY FOR IT TO ACTIVATE==========================

count nearestObjects [player, ["Land_HelipadCivil_F","Land_HelipadCircle_F","Land_HelipadRescue_F","Land_HelipadSquare_F","Land_HelipadEmpty_F"], 5] > 0;

//=================================================================================================
};
if (vehicle player == player) then {
}
else
{
_Helicopter_fuel = fuel vehicle player;
sleep 2;
vehicle player setFuel 0;
sleep 0.3;
vehicle player execVM "scripts\helipad.sqf";
vehicle player setFuel _Helicopter_fuel;
sleep 120;
heliPadOn = 0;
};
};

This post was edited by damana (2015-04-24 08:28, ago)


Author Message


Posts: 1589
Rank:


Level: Member

Country: pf
Location: Tahiti
Occupation: too many Arma
Age: 58
In-game name: Kobayashi Maru

 
#2 Posted at 2015-04-23 23:51        
     
There is no problem with the nearestObjects function. Script is OK. Probably waiting for a position of... player (0 provided, 3 expected (x,y,z)).
You're probably in a MP mission and player is not already defined. Add something like: waituntil {player == player};
before this script. Make sure the player/unit position exists!

PLEASE CONTACT ME ON BI FORUMS FOR ANY SCRIPT / MOD QUESTION. TKS

Advertisement


Author Message


Posts: 2
Rank:


Level: Member

Country: us
Location:
Occupation:
Age: 33
In-game name: Townailz

 
#3 Posted at 2015-04-24 08:26        
     
Thank you Pierre MGI Fixed it with your

waituntil {player == player}; Thanks a bunch