Jump to content
  • 0

Un simplu warning


manutzzu

Question

C:\Users\Marius\Desktop\Pronion\gamemodes\gf.pwn(54276) : warning 219: local variable "PlayerName" shadows a variable at a preceding level
Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase

Header size:          11872 bytes
Code size:          2330308 bytes
Data size:          3425272 bytes
Stack/heap size:      16384 bytes; estimated max. usage: unknown, due to recursion
Total requirements: 5783836 bytes

1 Warning.
Liniile pe unde da warningu
public OnPlayerText(playerid, text[])
{
    //SetPlayerChatBubble(playerid, text, 0xAAFF00FF, 10.0, 10000);
	new giver[MAX_PLAYER_NAME];
	new sendername[MAX_PLAYER_NAME];
	new giveplayer[MAX_PLAYER_NAME];
	new tmp[256];
	new string[256];
	new giveplayerid;
	text[0] = toupper(text[0]);
	SpamStrings[playerid] ++;
	if(SpamStrings[playerid] >= MAX_SPAM)
	{
	    new PlayerName[MAX_PLAYER_NAME];
		GetPlayerName(playerid, PlayerName, MAX_PLAYER_NAME);
		SendClientMessage(playerid,COLOR_BBLUE,"Please wait 2 seconds before you spam again (spam protection)");
		return 0;
	}
	if(PlayerInfo[playerid][pMuted] == 1)
	{
		SendClientMessage(playerid, COLOR_WHITE, "You cannot speak, you have been silenced");
		return 0;
	}
	for(new s = 0; s < ForbiddenWordCount; s++)
    {
		new pos;
		while((pos = strfind(text,ForbiddenWords[s],true)) != -1) for(new i = pos, j = pos + strlen(ForbiddenWords[s]); i < j; i++) text[i] = '*';
	}
	if(SelectChar[playerid] == 255)
	{
	    new idx;
	    tmp = strtok(text, idx);
	    if ((strcmp("next", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("next")))
		{
		    switch (SelectCharID[playerid])
			{
Linia exacta a warningului
new PlayerName[MAX_PLAYER_NAME];

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.