Omg stupid errors o.0
#1

Hey, took /pm cmd from the Base Filterscript (credits to samp 0.3a whoever made it) Because i wanted to have it in my admin filterscript. But when i try to compile i get this error. Heres the code btw. And i took the numbers from the error rows.

Код:
// PM COMMAND

(4605)  new pName[MAX_PLAYER_NAME];
(4606)  new Message[256];
(4607)  new iName[MAX_PLAYER_NAME];
(4608)  new gMessage[256];
(4609)
(4610)  if(strcmp("/pm", cmd, true) == 0)
(4611)	{
(4612)	  new	tmp[256];
(4613)	  new	idx;
	  
		tmp = strtok(cmdtext,idx);

		if(!strlen(tmp) || strlen(tmp) > 5) {
			SendClientMessage(playerid,red,"Usage: /pm (id) (message)");
			return 1;
		}

		new id = strval(tmp);
    gMessage = strrest(cmdtext,idx);

		if(!strlen(gMessage)) {
			SendClientMessage(playerid,red,"Usage: /pm (id) (message)");
			return 1;
		}

		if(!IsPlayerConnected(id)) {
			SendClientMessage(playerid,red,"Bad player ID");
			return 1;
		}

		if(playerid != id) {
			GetPlayerName(id,iName,sizeof(iName));
			GetPlayerName(playerid,pName,sizeof(pName));
			format(Message,sizeof(Message),"%s(%d): %s",pName,playerid,gMessage);
			SendClientMessage(id,yellow,Message);
			PlayerPlaySound(id,1085,0.0,0.0,0.0);

			printf("[Pm] %s: '%s' to %s",pName,Message,iName);

		}
		else {
			SendClientMessage(playerid,red,"Cant PM Yourself");
		}
    return 1;
  }
  
// Ends here
And heres the error
Код:
C:\Documents and Settings\Administrator\Desktop\Server\filterscripts\admin.pwn(4605) : warning 219: local variable "pName" shadows a variable at a preceding level
C:\Documents and Settings\Administrator\Desktop\Server\filterscripts\admin.pwn(4612) : warning 219: local variable "tmp" shadows a variable at a preceding level
C:\Documents and Settings\Administrator\Desktop\Server\filterscripts\admin.pwn(4613) : warning 219: local variable "idx" shadows a variable at a preceding level
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


3 Warnings.
Please help me with anything you can, thanks
Reply


Messages In This Thread
Omg stupid errors o.0 - by bajskorv123 - 09.12.2009, 09:55
Re: Omg stupid errors o.0 - by Mikep. - 09.12.2009, 11:02
Re: Omg stupid errors o.0 - by acade - 09.12.2009, 11:29
Re: Omg stupid errors o.0 - by Correlli - 09.12.2009, 11:31
Re: Omg stupid errors o.0 - by jamesbond007 - 09.12.2009, 15:11
Re: Omg stupid errors o.0 - by Mikep. - 09.12.2009, 17:06
Re: Omg stupid errors o.0 - by bajskorv123 - 10.12.2009, 17:43

Forum Jump:


Users browsing this thread: 1 Guest(s)