if(strcmp(cmdtext, "/guardioes", true) == 0){
SendClientMessage(playerid,0x0080C0AA, "» Guardioes Online:");
new Player[24];
new count = 0;
new msg[120];
for(new i=0; i<MAX_PLAYERS; i++){
if(IsPlayerConnected(i) && dini_Int(file, "Profissao") == Guardiao(i)){
GetPlayerName(i,Player,24);
format(msg,sizeof(msg),"%s (%d)", Player,i);
SendClientMessage(playerid, 0xFFFFFFAA, msg);
count++;
}
}
if(count == 0){
}
return 1;
}
error 029: invalid expression, assumed zero
error 001: expected token: ";", but found ")"
error 029: invalid expression, assumed zero
if(IsPlayerConnected(i) && dini_Int(file, "Profissao") == Guardiao(i)){
if(strcmp(cmdtext, "/guardioes", true) == 0)
{
SendClientMessage(playerid,0x0080C0AA, "» Guardioes Online:");
Player[24];
new count = 0;
new msg[120];
for(new i=0; i<MAX_PLAYERS; i++)
{
if(Guardiao(i) == 1) { count++; }
if(count == 1)
{
GetPlayerName(i,Player,24);
format(msg,sizeof(msg),"%s (%d)", Player,i);
SendClientMessage(playerid, 0xFFFFFFAA, msg);
}
else return SendClientMessage(playerid, -1, "Nгo hб nenhum guardiгo online.");
}
return 1;
}
Acho que vocк quis fazer isso:
PHP код:
|
error 029: invalid expression, assumed zero
error 001: expected token: ";", but found ")"
error 029: invalid expression, assumed zero
if(Guardiao(i) == 1) { count++; }
if(!strcmp(cmdtext, "/guardioes", true))
{
SendClientMessage(playerid,0x0080C0AA, "» Guardioes Online:");
static
iGuardas = 0;
sString[128];
for(new i; i < MAX_PLAYERS; i++)
{
if(!Guardiao[i] || !IsPlayerConnected(i)) continue;
iGuardas++;
{
GetPlayerName(i, sString, MAX_PLAYER_NAME);
format(sString, 128, "%s (%d)", sString, i);
SendClientMessage(playerid, 0xFFFFFFAA, sString);
}
}
if(!iGuardas) SendClientMessage(playerid, -1, "Nгo hб nenhum guardiгo online.");
return true;
}