error 017: undefined symbol "GetPlayerDistanceFromPoint" -
guitarmandanny - 27.10.2012
Hey guys, I'm getting this error, I have latest 0.3e R2 Server and latest a_samp.inc
Код:
C:\Users\Dan\Desktop\samp03e_svr_R2_win32 - Copy\gamemodes\Gamemode.pwn(2313) : error 017: undefined symbol "GetPlayerDistanceFromPoint"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
2 Errors.
The error is on this line
Код:
dist = GetPlayerDistanceFromPoint(playerid, x, y, z);
this is the rest of the Stock im trying to add.
Код:
stock GetClosestVehicle(playerid)
{
#pragma unused playerid
new Float:x, Float:y, Float:z;
new Float:dist, Float:closedist=9999, closeveh;
for(new i=1; i < MAX_VEHICLES; i++)
{
if(GetVehiclePos(i, x, y, z))
{
dist = GetPlayerDistanceFromPoint(playerid, x, y, z);
if(dist < closedist)
{
closedist = dist;
closeveh = i;
}
}
}
return closeveh;
}
Re: error 017: undefined symbol "GetPlayerDistanceFromPoint" -
sgtjones12 - 27.10.2012
GetPlayerDistanceFromPoint is not defined in the script so that means where you have
Код:
new Float:x, Float:y, Float:z;
new Float:dist, Float:closedist=9999, closeveh;
you need to add
Код:
new GetPlayerDistanceFromPoint
Re: error 017: undefined symbol "GetPlayerDistanceFromPoint" -
[HK]Ryder[AN] - 27.10.2012
@sgtjones12
He doesnt need to add it. it is a samp function.
check if your includes are updated and recompile gamemode.
EDIT - heres a code for GetClosestVehicleFromPoint..if you are trying to make that
pawn Код:
stock GetClosestVehicleFromPoint(Float:x,Float:y)
{
new Float:distance = 2222,Float:tx,Float:ty,Float:z,vehicleid = -1;
for(new i = 0;i<MAX_VEHICLES;i++)
{
GetVehiclePos(i,tx,ty,z);
new Float:temp = GetDistanceBetweenPoints(x,y,tx,ty);
if(temp < distance)
{
vehicleid = i;
distance = temp;
}
}
return vehicleid;
}
Credits - gamer931215
Re: error 017: undefined symbol "GetPlayerDistanceFromPoint" -
sgtjones12 - 27.10.2012
Quote:
Originally Posted by [HK]Ryder[AN]
@sgtjones12
He doesnt need to add it. it is a samp function.
check if your includes are updated and recompile gamemode.
|
he says he has the latest version of a_samp.inc
Re: error 017: undefined symbol "GetPlayerDistanceFromPoint" -
JaKe Elite - 27.10.2012
Quote:
Originally Posted by sgtjones12
GetPlayerDistanceFromPoint is not defined in the script so that means where you have
Код:
new Float:x, Float:y, Float:z;
new Float:dist, Float:closedist=9999, closeveh;
you need to add
Код:
new GetPlayerDistanceFromPoint
|
new GetPlayerDistanceFromPoint?
You've to be kidding me.
Men why don't you go learn scripting before posting something like that?
Re: error 017: undefined symbol "GetPlayerDistanceFromPoint" -
KevinPRINCE - 27.10.2012
Its
Re: error 017: undefined symbol "GetPlayerDistanceFromPoint" -
sgtjones12 - 27.10.2012
Quote:
Originally Posted by Romel
new GetPlayerDistanceFromPoint?
You've to be kidding me.
Men why don't you go learn scripting before posting something like that?
|
i meant
define not
new and i see you didnt try to help so fuck off
Re: error 017: undefined symbol "GetPlayerDistanceFromPoint" -
Vince - 27.10.2012
Quote:
Originally Posted by KevinPRINCE
|
Quote:
Originally Posted by sgtjones12
i meant define not new and i see you didnt try to help so fuck off
|
You're both also NOT helping, so keep your mouths shut. You both clearly have absolutely no idea what you're talking about. GetPlayerDistanceFromPoint is a
native sa-mp function which is defined in
a_players.inc. A simple way to check that is to open that include and check for the existance of that function. If it is not present, then that include is most definitely not the latest version.
Re: error 017: undefined symbol "GetPlayerDistanceFromPoint" -
guitarmandanny - 27.10.2012
Quote:
Originally Posted by Vince
You're both also NOT helping, so keep your mouths shut. You both clearly have absolutely no idea what you're talking about. GetPlayerDistanceFromPoint is a native sa-mp function which is defined in a_players.inc. A simple way to check that is to open that include and check for the existance of that function. If it is not present, then that include is most definitely not the latest version.
|
Cheers Vince I forgot to check in the a_players.inc file.
It was the up to date version but the
Код:
native Float:GetPlayerDistanceFromPoint(playerid, Float:X, Float:Y, Float:Z);
was missing.
Re: error 017: undefined symbol "GetPlayerDistanceFromPoint" -
guitarmandanny - 27.10.2012
Also guys, didnt want to make a new thread and spam the script help section with my name so I'll post it here xD
Is there a way to get Vehicle health between a value for example
GetVehicleHealth(vehicleid, 800 | 999)?