error 017: undefined symbol "GetPlayerDistanceFromPoint"
#1

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;
}
Reply
#2

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
Reply
#3

@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
Reply
#4

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
Reply
#5

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?
Reply
#6

Its
PHP код:
#define (...) 
Reply
#7

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
Reply
#8

Quote:
Originally Posted by KevinPRINCE
Посмотреть сообщение
Its
PHP код:
#define (...) 
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.
Reply
#9

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.
Reply
#10

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)?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)