Error for PlayerToPoint?
#1

Hello everybody,
I have a problem with my code because pawno return me 9 errors, that is
Код:
(369) : error 029: invalid expression, assumed zero
(369) : error 017: undefined symbol "PlayerToPoint"
(370) : error 029: invalid expression, assumed zero
(370) : error 017: undefined symbol "PlayerToPoint"
(377) : error 017: undefined symbol "x"
(378) : error 017: undefined symbol "y"
(379) : error 017: undefined symbol "z"
(380) : error 017: undefined symbol "radi"
(387) : error 030: compound statement not closed at the end of file (started at line 327)
This is the code:
Код:
forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);
public PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
{
    if(IsPlayerConnected(playerid))
    {
        new Float:oldposx, Float:oldposy, Float:oldposz;
        new Float:tempposx, Float:tempposy, Float:tempposz;
        GetPlayerPos(playerid, oldposx, oldposy, oldposz);
        tempposx = (oldposx -x);
        tempposy = (oldposy -y);
        tempposz = (oldposz -z);
        if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
        {
            return 1;
		}
	}
	return 0;
}
//Finish gamemode
I hope can somebody help me..
(I am sorry for my English, I am Italian!)
Reply
#2

Why are you using PlayerToPoint?

Use IsPlayerInRangeOfPoint
https://sampwiki.blast.hk/wiki/IsPlayerInRangeOfPoint


or
https://sampwiki.blast.hk/wiki/GetPlayerDistanceFromPoint
Reply
#3

Quote:
Originally Posted by TwinkiDaBoss
Посмотреть сообщение
How can I?
Reply
#4

Quote:
Originally Posted by Joyeux
Посмотреть сообщение
How can I?
Read the wiki. Simple usage would be.

PHP код:
if(IsPlayerInRangeOfPoint(playerid,10.00.00.00.0)) return SendClientMessage(playerid,COLOR_RED,"You are in 10 range of 0.0 0.0 0.0"); 
Reply
#5

Quote:
Originally Posted by TwinkiDaBoss
Посмотреть сообщение
Read the wiki. Simple usage would be.

PHP код:
if(IsPlayerInRangeOfPoint(playerid,10.00.00.00.0)) return SendClientMessage(playerid,COLOR_RED,"You are in 10 range of 0.0 0.0 0.0"); 
I can write to you in private?
Reply
#6

Quote:
Originally Posted by Joyeux
Посмотреть сообщение
I can write to you in private?
Yes of course
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)