[AJUDA] Warning em CMD
#1

Bom fiz um comando de /admins

e deu um warning.

Код:
    if(strcmp(cmdtext, "/admins", true) == 0)
	{
		new Jogador[24];
		new count5;
		new msg[120];
		for (new i=0; i<MAX_PLAYERS; i++) {
	    if(IsPlayerConnected(i) && IsPlayerAdmin(i)){
		GetPlayerName (i,Jogador,24);
		format (msg,sizeof (msg), "Admins Online : %s",Jogador);
	    SendClientMessage(playerid, 0xFFFFFFAA, msg);
        count5++;
        }
        }
        if(count5 == 0){
        SendClientMessage(playerid, 0xFFFFFFAA, "Nenhum Admin Online No Momento Aguarde.");
        }
		return 1;
	}
	 return SendClientMessage(playerid, 0xAA3333AA, "Comando Nгo existe.");
  }

Warning >

Код:
C:\Documents and Settings\Usuario\Desktop\Iniciante\gamemodes\RP.pwn(191) : warning 217: loose indentation
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Warning.
Reply
#2

Aprenda a identar seus codes!
Looses indetinations nгo afetam em nada o desempenho do servidor, й sу um aviso de desorganizaзгo do script
Reply
#3

Pйssima identaзгo! Arrume-a ou ponha no topo do GM:
pawn Код:
#pragma tabsize 4
Como o cara acima falou, nгo afeta em nada no desempenho, mas й bom por razхes "estйticas" e de organizaзгo.
Reply
#4

pawn Код:
if(strcmp(cmdtext, "/admins", true) == 0)// o if tem que ficar em cima da chave aqui no forum da uns bug sinisto =)
    {
        new
            Jogador[24],
            count5,
            msg[120]
        ;
        for(new i = 0; i < MAX_PLAYERS; i++)
        {
            if(IsPlayerConnected(i) && IsPlayerAdmin(i))
            {
                GetPlayerName(i, Jogador, 24);
                format(msg, sizeof(msg), "Admins Online : %s", Jogador);
                SendClientMessage(playerid, 0xFFFFFFAA, msg);
                count5++;
            }
        }
        if(count5 == 0)
        {
            SendClientMessage(playerid, 0xFFFFFFAA, "Nenhum Admin Online No Momento Aguarde.");
        }
        return true;
    }
Reply
#5

pawn Код:
if(!strcmp(cmdtext, "/admins", true))
    {
        static
            Jogador[24],
            msg[100],
            count5
        ;
        count5 = false;
        for (new i=0, e = GetMaxPlayers(); i != e; i++)
        {
            if(IsPlayerConnected(i) && IsPlayerAdmin(i))
            {
                GetPlayerName (i,Jogador,24);
                format (msg,sizeof (msg), "Admins Online : %s",Jogador);
                SendClientMessage(playerid, 0xFFFFFFAA, msg);
                count5 = true;
            }
        }
        if(!count5) return SendClientMessage(playerid, 0xFFFFFFAA, "Nenhum Admin Online No Momento Aguarde.");
        return 1;
    }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)