Some errors - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Some errors (
/showthread.php?tid=375762)
Some errors -
Deaglez - 08.09.2012
Plz help me with this errors
Код:
C:\Users\Zhen\Desktop\Games\GTA - San Andreas\SAMP Server\gamemodes\Noobflies11.PWN(299) : error 017: undefined symbol "GetClosestPlayer"
C:\Users\Zhen\Desktop\Games\GTA - San Andreas\SAMP Server\gamemodes\Noobflies11.PWN(303) : error 017: undefined symbol "GetDistanceBetweenPlayers"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
2 Errors.
Re: Some errors -
Scott Zulkifli - 08.09.2012
Try
pawn Код:
forward GetClosestPlayer(p1);
public GetClosestPlayer(p1)
{
new
x,
Float:dis,
Float:dis2,
player;
player = -1;
dis = 99999.99;
for (x=0;x<MAX_PLAYERS;x++)
if(IsPlayerConnected(x))
if(x != p1)
{
dis2 = GetDistanceBetweenPlayers(x,p1);
if(dis2 < dis && dis2 != -1.00)
{
dis = dis2;
player = x;
}
}
return player;
}
Re: Some errors -
Deaglez - 08.09.2012
but...where do i put it?
Re: Some errors - Jarnu - 08.09.2012
anywhere under OnGameModeInit callback