Error Compile
#1

Guys, I just added /w to my script...
But this comes up...

Код:
C:\Documents and Settings\hidden_user\My Documents\GTA SA Server\gamemodes\cnr.pwn(1303) : error 017: undefined symbol "GetDistanceBetweenPlayers"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
And this is the command code....

Код:
 	if(strcmp(cmdtext,"/w",true)==0)
	{
	    if(strlen(cmdtext) <= 3)
		{
		    SendClientMessage(playerid,0xFF0000FF,"USAGE: /w (msg)");
		    return 1;
	    }
	    new string[128];
	    new output[150];
		new pname[24];
		GetPlayerName(playerid, pname, 24);
	    strmid(output,cmdtext,2,strlen(cmdtext));
	    format(string, sizeof(string), "(WHISPER): %s [%d] %s",pname,playerid,output);
	    printf("%s", string);
	    for(new i=0;i<MAX_PLAYERS;i++)
		{
		    if(IsPlayerConnected(i) && GetDistanceBetweenPlayers(playerid,i) < 20)
			{
			   format(string, sizeof(string), "(WHISPER): %s [%d] %s",pname,playerid,output);
			   SendClientMessage(i,0xF2FF00FF,string);
		    }
	    }
	    return 1;
    }
Could you please try and fix it!
Reply
#2

looks like you're trying to access a function without having that function in your script, you are using GetDistanceBetweenPlayers, but you don't have that in your script

this will help you in the future
https://sampforum.blast.hk/showthread.php?tid=274028
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)