How do i solve this?
#4

shadows a variable at a preceding level means that its already defined within or out of a function. Example:

pawn Код:
new string[128]; //Defined outside
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/mycommand", cmdtext, true, 10) == 0)
    {
      new string[128]; //Defined Inside; Twice = Preceding Level
      format(string, sizeof(string), "Your Name Is %s");
      SendClientMessage(playerid, 0x33CCFFAA, string);
        return 1;
    }
    return 0;
}
Код:
C:\Documents and Settings\User\Desktop\Untitled.pwn(94) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Documents and Settings\User\Desktop\Untitled.pwn(236) : warning 203: symbol is never used: "string"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Warnings.
It also includes it if its defined already in a include file.



(376) : warning 219: local variable "X" shadows a variable at a preceding level
and

- So Get rid of "X"


(204) : warning 235: public function lacks forward declaration (symbol "SendMSG")

forward SendMSG();
Reply


Messages In This Thread
How do i solve this? - by Hailine - 06.01.2010, 22:35
Re: How do i solve this? - by ClanDBZVegeta - 06.01.2010, 22:38
Re: How do i solve this? - by Hailine - 06.01.2010, 22:41
Re: How do i solve this? - by BP13 - 06.01.2010, 22:46
Re: How do i solve this? - by Hailine - 06.01.2010, 22:58
Re: How do i solve this? - by BP13 - 06.01.2010, 23:18

Forum Jump:


Users browsing this thread: 1 Guest(s)