Warning


Započeo Fergosonn, April 12, 2021, 11:43:03 PRE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

C:\Users\Klinac\Desktop\New Folder(1)\treasure\gamemodes\TR.pwn(495) : warning 219: local variable "using_deprecated_foreach_syntax" shadows a variable at a preceding level
Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase

Header size:           5936 bytes
Code size:           214052 bytes
Data size:           233912 bytes
Stack/heap size:      16384 bytes; estimated max. usage: unknown, due to recursion
Total requirements:  470284 bytes

1 Warning.

Kod
forward SendAdminMessage(color, string[]);
public SendAdminMessage(color, string[])
{
	foreach(Player,i)
	{
		if(PlayerInfo[i][Admin] >= 1)
		{
			SendClientMessage(i, color, string);
		}
	}
}

pokusaj ovako
FUNCTION: AdminMessage( color, string[] )
{
    for( new i = 0; i < MAX_PLAYERS; i++)
	{
		if( IsPlayerConnected( i ) )
		{
		    if( PlayerInfo[ i ][ pAdmin ] >= 1 || IsPlayerAdmin( i ) )
			{
				SCM( i, color, string );
			}
		}
	}
    return true;
}
CitatNe idite uokolo tumačeći kako vam svijet duguje život. Svijet vam ne duguje ništa. On je bio prvi ovdje.

Citat: Leʞรa poslato April 12, 2021, 11:58:56 PRE PODNE
pokusaj ovako
FUNCTION: AdminMessage( color, string[] )
{
    for( new i = 0; i < MAX_PLAYERS; i++)
	{
		if( IsPlayerConnected( i ) )
		{
		    if( PlayerInfo[ i ][ pAdmin ] >= 1 || IsPlayerAdmin( i ) )
			{
				SCM( i, color, string );
			}
		}
	}
    return true;
}

resio sam al sam zaboravio da Loc hvala u svakom slucaju