Errors and Warnings doing the local chat system
#1

Hi guys.

So I tried to do a local chat system for my gamemode by myself, using foreach and zcmd, as some users advice me earlier, but it as some warnings and errors that I don't know how to fix.
The code:

PHP код:
public OnPlayerText;
new 
string[144], text[120], name[MAX_PLAYER_NAME], FloatpXFloatpYFloatpZ;
GetPlayerName (playeridnamesizeof(name));
  
format(string1sizeof(string1), "%s diz: %s"nametext); // "diz" = " says " in english
    
GetPlayerPos(playeridposXposYposZ);
     foreach(new 
iPlayer)
    {
        if(
IsPlayerInRangeOfPoint(i6.0pXpYpZ))
        {
            
SendClientMessage(ibrancostring); //"branco" = " white " in english 
        
}
    } 
And there's the warnings and the errors:

Quote:

C:\Users\Joka\Desktop\New folder (2)\pawno\include\sscanf2.inc(199) : warning 219: local variable "name" shadows a variable at a preceding level
C:\Users\Joka\Desktop\New folder (2)\pawno\include\sscanf2.inc(305) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Joka\Desktop\New folder (2)\pawno\include\sscanf2.inc(305) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Joka\Desktop\New folder (2)\pawno\include\sscanf2.inc(365) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Joka\Desktop\New folder (2)\pawno\include\sscanf2.inc(365) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Joka\Desktop\New folder (2)\gamemodes\GamemodeRP.pwn(33) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Joka\Desktop\New folder (2)\gamemodes\GamemodeRP.pwn(33) : warning 219: local variable "text" shadows a variable at a preceding level
C:\Users\Joka\Desktop\New folder (2)\gamemodes\GamemodeRP.pwn(33) : warning 219: local variable "name" shadows a variable at a preceding level
C:\Users\Joka\Desktop\New folder (2)\gamemodes\GamemodeRP.pwn(33) : warning 219: local variable "pX" shadows a variable at a preceding level
C:\Users\Joka\Desktop\New folder (2)\gamemodes\GamemodeRP.pwn(33) : warning 219: local variable "pY" shadows a variable at a preceding level
C:\Users\Joka\Desktop\New folder (2)\gamemodes\GamemodeRP.pwn(33) : warning 219: local variable "pZ" shadows a variable at a preceding level
C:\Users\Joka\Desktop\New folder (2)\gamemodes\GamemodeRP.pwn(55) : error 021: symbol already defined: "GetPlayerName"
C:\Users\Joka\Desktop\New folder (2)\gamemodes\GamemodeRP.pwn(5 : error 010: invalid function or declaration
C:\Users\Joka\Desktop\New folder (2)\gamemodes\GamemodeRP.pwn(60) : error 010: invalid function or declaration
C:\Users\Joka\Desktop\New folder (2)\gamemodes\GamemodeRP.pwn(66) : warning 203: symbol is never used: "name"
C:\Users\Joka\Desktop\New folder (2)\gamemodes\GamemodeRP.pwn(66) : warning 203: symbol is never used: "pX"
C:\Users\Joka\Desktop\New folder (2)\gamemodes\GamemodeRP.pwn(66) : warning 203: symbol is never used: "pY"
C:\Users\Joka\Desktop\New folder (2)\gamemodes\GamemodeRP.pwn(66) : warning 203: symbol is never used: "pZ"
C:\Users\Joka\Desktop\New folder (2)\gamemodes\GamemodeRP.pwn(66) : warning 203: symbol is never used: "string"
C:\Users\Joka\Desktop\New folder (2)\gamemodes\GamemodeRP.pwn(66) : warning 203: symbol is never used: "text"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


3 Errors.

Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)