error 021: symbol already defined: "PlayerToPoint" -
cooljoey99 - 03.01.2010
How do i fix this error:
D:\Rockstar Games\GTA San Andreas\gamemodes\larp.pwn(4157
![Cool](images/smilies/cool.gif)
: error 021: symbol already defined: "PlayerToPoint"
D:\Rockstar Games\GTA San Andreas\gamemodes\larp.pwn(43417) : warning 235: public function lacks forward declaration (symbol "OnPlayerPrivmsg")
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
i searched for an hour and i cant find anything.
Re: error 021: symbol already defined: "PlayerToPoint" -
Agent Smith - 03.01.2010
Post those lines here.
Re: error 021: symbol already defined: "PlayerToPoint" -
cooljoey99 - 03.01.2010
public PlayerToPoint (Float:radi, playerid, Float
![angry](images/smilies/mad.gif)
, Float:y, Float:z)
{
if(IsPlayerConnected(playerid))
{
new Float
![Shocked](images/smilies/surprised.gif)
ldposx, Float
![Shocked](images/smilies/surprised.gif)
ldposy, Float
![Shocked](images/smilies/surprised.gif)
ldposz;
new Float:tempposx, Float:tempposy, Float:tempposz;
GetPlayerPos(playerid, oldposx, oldposy, oldposz);
tempposx = (oldposx -x);
tempposy = (oldposy -y);
tempposz = (oldposz -z);
//printf("DEBUG: X:%f Y:%f Z:%f",posx,posy,posz);
if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
{
return 1;
}
}
return 0;
}
public PlayerToPointStripped(Float:radi, playerid, Float
![angry](images/smilies/mad.gif)
, Float:y, Float:z, Float:curx, Float:cury, Float:curz)
{
if(IsPlayerConnected(playerid))
{
new Float:tempposx, Float:tempposy, Float:tempposz;
tempposx = (curx -x);
tempposy = (cury -y);
tempposz = (curz -z);
if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi))) return 1;
}
return 0;
}
This lines?
Re: error 021: symbol already defined: "PlayerToPoint" -
[HiC]TheKiller - 03.01.2010
Use IsPlayerInRange of point, It's a inbuilt sa-mp function and it's better.
Re: error 021: symbol already defined: "PlayerToPoint" -
cooljoey99 - 03.01.2010
so this PlayerToPoint to IsPlayerInRange
Re: error 021: symbol already defined: "PlayerToPoint" -
Agent Smith - 03.01.2010
Change PlayerToPoint fuction to IsPlayerInRange
Re: error 021: symbol already defined: "PlayerToPoint" -
cooljoey99 - 03.01.2010
k ty
Re: error 021: symbol already defined: "PlayerToPoint" -
Correlli - 03.01.2010
Check
this page before you change it.