error 021: symbol already defined: "PlayerToPoint"
#1

How do i fix this error:
D:\Rockstar Games\GTA San Andreas\gamemodes\larp.pwn(4157 : 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.
Reply
#2

Post those lines here.
Reply
#3

public PlayerToPoint (Float:radi, playerid, Float, Float:y, Float:z)
{
if(IsPlayerConnected(playerid))
{
new Floatldposx, Floatldposy, Floatldposz;
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, 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?
Reply
#4

Use IsPlayerInRange of point, It's a inbuilt sa-mp function and it's better.
Reply
#5

so this PlayerToPoint to IsPlayerInRange
Reply
#6

Change PlayerToPoint fuction to IsPlayerInRange
Reply
#7

k ty
Reply
#8

Check this page before you change it.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)