if(strcmp(cmd, "/lideres", true) == 0)
{
for(new l = 0; l < dini_Get(gFile, "Dono"); l++)
{
if(IsPlayerConnected(l))
{
new msg[64];
SendClientMessage(playerid, -1, "[BDP] Lнderes Online:");
format(msg, sizeof(msg), "[BDP] Lнder %s | Clг %s", dini_Get(gFile, "Dono"), dini_Get(pFile, "cla"));
SendClientMessage(playerid, -1, msg);
}
else return SendClientMessage(playerid, -1, "[BDP] Nenhum lнder online");
}
return 1;
}
error 033: array must be indexed (variable "dini_Get")
if(strcmp(cmd, "/lideres", true) == 0)
{
for(new l = 0; l < dini_Get(gFile, "Dono"); l++) // <<< aqui
{
if(IsPlayerConnected(l))
{
new msg[64];
SendClientMessage(playerid, -1, "[BDP] Lнderes Online:");
format(msg, sizeof(msg), "[BDP] Lнder %s | Clг %s", dini_Get(gFile, "Dono"), dini_Get(pFile, "cla"));
SendClientMessage(playerid, -1, msg);
}
else return SendClientMessage(playerid, -1, "[BDP] Nenhum lнder online");
}
return 1;
}
if( strcmp( cmd, "/lideres", true ) == 0 )
{
new
countliders
;
SendClientMessage( playerid, -1, "[BDP] Lнderes Online:" );
for( new l = 0; l < MAX_PLAYERS; l++ ) // <<< aqui
{
if( IsPlayerConnected( l ))
{
new
msg[ 64 ]
;
format( pFile, sizeof( pFile ), "clas/%s.ini", PlayerName( i ));
if( dini_Exists( pFile ))
{
if( strcmp( dini_Get( pFile, "cla" ), "Nenhum", false ))
{
new
formy[ 128 ]
;
format( formy, sizeof( formy ), "clas/%s.ini", dini_Get( pFile, "cla" ));
if( strcmp( dini_Get( formy, "Dono" ), PlayerName( i ), true ) == 0 )
{
countliders ++;
format( msg, sizeof( msg ), "[BDP] Lнder %s | Clг %s", PlayerName( i ), dini_Get( pFile, "cla" ));
SendClientMessage( playerid, -1, msg );
}
}
}
}
}
if( countliders <= 0 ) return SendClientMessage( playerid, -1, "[BDP] Nenhum lнder online");
return 1;
}
stock PlayerName( playerid )
{
new gName[MAX_PLAYER_NAME+1];
GetPlayerName( playerid, gName, sizeof(gName));
return gName;
}
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
Header size: 664 bytes Code size: 49736 bytes Data size: 42192 bytes Stack/heap size: 16384 bytes; estimated max. usage=5347 cells (21388 bytes) Total requirements: 108976 bytes |