SA-MP Forums Archive
Weird error on an /arrest cmd. - 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: Weird error on an /arrest cmd. (/showthread.php?tid=393058)



Weird error on an /arrest cmd. - Socan - 16.11.2012

What is wrong with this;

Код:
	if(IsPlayerInRangeOfPoint(playerid, 5.0, XX1, YY1, ZZ1))
	{
	    format(string,sizeof(string),"%s(%d) is too far away. You cannot reach him to arrest him.",PlayerName(id),id);
	    SendClientMessage(playerid,-1,string);
	    return 1;
	}
Here are the errors I'm getting,

Код:
C:\Users\School\Desktop\Team DeathMatch\gamemodes\afp.pwn(660) : error 012: invalid function call, not a valid address
C:\Users\School\Desktop\Team DeathMatch\gamemodes\afp.pwn(660) : warning 215: expression has no effect
C:\Users\School\Desktop\Team DeathMatch\gamemodes\afp.pwn(660) : error 001: expected token: ";", but found ")"
C:\Users\School\Desktop\Team DeathMatch\gamemodes\afp.pwn(660) : error 029: invalid expression, assumed zero
C:\Users\School\Desktop\Team DeathMatch\gamemodes\afp.pwn(660) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.



Re: Weird error on an /arrest cmd. - Socan - 16.11.2012

Anyone?


Re: Weird error on an /arrest cmd. - KiNG3 - 16.11.2012

What is line 660, is it the String part or what?


Re: Weird error on an /arrest cmd. - Socan - 16.11.2012

The format(string part.


Re: Weird error on an /arrest cmd. - KiNG3 - 16.11.2012

Aight, this is straight from my script, but edited to your stuff.

pawn Код:
format(string, sizeof(string), "%s(%d) is too far away. You cannot reach him to arrest him.",PlayerName(id),id);
Try that.