13.08.2014, 13:49
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:
And there's the warnings and the errors:
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], Float: pX, Float: pY, Float: pZ;
GetPlayerName (playerid, name, sizeof(name));
format(string1, sizeof(string1), "%s diz: %s", name, text); // "diz" = " says " in english
GetPlayerPos(playerid, posX, posY, posZ);
foreach(new i: Player)
{
if(IsPlayerInRangeOfPoint(i, 6.0, pX, pY, pZ))
{
SendClientMessage(i, branco, string); //"branco" = " white " in english
}
}
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. |