Script help
#1

hello guys im trying to make this little commande and i dont know whats the probleme exactly i want to make if someone in this place he can perss' KEY_FIRE' to open something this is the code

Код:
new keys,updown,leftright;
	GetPlayerKeys(playerid,keys,updown,leftright);
	if (PlayerToPoint(1.5, playerid, 1346.5016,-1758.7649,13.5156))
	if (keys == KEY_FIRE)
	{
Error
Код:
161) : warning 213: tag mismatch
and the error 161 is
Код:
if (PlayerToPoint(1.5, playerid, 1346.5016,-1758.7649,13.5156))
Reply
#2

Your code:
Код:
if (PlayerToPoint(1.5, playerid, 1346.5016,-1758.7649,13.5156))
Try this code:
Код:
if(PlayerToPoint(playerid, 1.5, 1346.5016,-1758.7649,13.5156))
PlayerToPoint was deprecated use IsPlayerInRangeOfPoin

Код:
if(IsPlayerInRangeOfPoin(playerid, 1.5, 1346.5016,-1758.7649,13.5156))
Add me +rep if I help you
Reply
#3

Код:
if(PlayerToPoint(playerid, 1.5, 1346.5016,-1758.7649,13.5156))
This is Right Code !

Код:
if(PlayerToPoint(playerid, 70.0, 2468.4919,-2092.9902,13.5469))
This is a example that show that CODE will work :P
Reply
#4

i can only add one if(PlayerToPoint(playerid, 70.0, 2468.4919,-2092.9902,13.5469))
if i do for exemple
if(PlayerToPoint(playerid, 70.0, 2468.4919,-2092.9902,13.5469 || PlayerToPoint(playerid, 70.0, 2468.4919,-2452.9902,13.5469 ))
it making me this error

Код:
C:\Users\Mininou\Desktop\Vodka\filterscripts\Spray.pwn(162) : warning 213: tag mismatch
C:\Users\Mininou\Desktop\Vodka\filterscripts\Spray.pwn(163) : error 001: expected token: ")", but found "{"
Reply
#5

You missed a bracket
pawn Код:
if(PlayerToPoint(playerid, 70.0, 2468.4919,-2092.9902,13.5469) || PlayerToPoint(playerid, 70.0, 2468.4919,-2452.9902,13.5469 ))
Reply
#6

My code is right use it dont worry
Reply
#7

now when i add '3' of PlayerToPoint it giving me same error
Код:
    if(PlayerToPoint(playerid, 70.0, 2468.4919,-2092.9902,13.5469) || PlayerToPoint(playerid, 70.0, 2468.4919,-2452.9902,13.5469 || PlayerToPoint(playerid, 70.0, 2468.4919,-2452.9902,13.5469 ))
Reply
#8

Found BUG forget ')'
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)