[AVISO]OLHEM!!
#1

olha, meu /particiar /par ta dando erro, o erro que da й esse:

Код:
C:\Documents and Settings\uso\Desktop\SAMP\gamemodes\BVR.pwn(30017) : warning: 217: loose indentation
C:\Documents and Settings\uso\Desktop\SAMP\gamemodes\BVR.pwn(30017) : warning: 217: loose indentation

E

C:\Documents and Settings\uso\Desktop\SAMP\gamemodes\BVR.pwn(30047) : warning: 217: loose indentation
C:\Documents and Settings\uso\Desktop\SAMP\gamemodes\BVR.pwn(30047) : warning: 217: loose indentation
Vou manda o cmd:

Код:
if(strcmp(cmd, "/particular", true) == 0 || strcmp(cmd, "/par", true) == 0)
	{
	    if(gPlayerLogged[playerid] == 0)
	    {
	    SendClientMessage(playerid, COLOR_GREY, "   Vocк nгo estб Logado!");
	    return 1;
	    }
	    if(PlayerInfo[playerid][pAdmin] >= 1 || PlayerInfo[playerid][pHelper] >= 1)
	    {
	    }
		tmp = strtok(cmdtext, idx);
		if(!strlen(tmp))
		{
			SendClientMessage(playerid, COLOR_GRAD2, "USE: (/par)ticular [ID/Nome] [texto]");
			return 1;
		}
		giveplayerid = ReturnUser(tmp);
		if (IsPlayerConnected(giveplayerid))
		{
		if (HidePM[giveplayerid] == 1)
		{
		SendClientMessage(playerid, COLOR_GRAD1, "Este jogador tem as particulares bloqueadas !");
		return 1;
        }
		    if(giveplayerid != INVALID_PLAYER_ID)
		    {
                if(PlayerInfo[playerid][pAdmin] < 1 && PlayerInfo[playerid][pHelper] < 0)
	    		{
	    			if(PlayerInfo[giveplayerid][pAdmin] == 0 && PlayerInfo[giveplayerid][pHelper] == 1)
					{
						SendClientMessage(playerid, COLOR_GRAD1, "Vocк apenas pode mandar /par para um Administrador ou Helper!");
						return 1;
					}
                }
		        GetPlayerName(playerid, sendername, sizeof(sendername));
				GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
				new length = strlen(cmdtext);
				while ((idx < length) && (cmdtext[idx] <= ' '))
				{
					idx++;
				}
				new offset = idx;
				new result[256];
				while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
				{
					result[idx - offset] = cmdtext[idx];
					idx++;
				}
				result[idx - offset] = EOS;
				if(!strlen(result))
				{
					SendClientMessage(playerid, COLOR_GRAD2, "USE: (/par)ticular [ID/Nome] [texto]");
					return 1;
            }
    		if(PlayerInfo[playerid][pAdmin] == 0 && PlayerInfo[playerid][pHelper] == 0)
	    	{
			format(string, sizeof(string), "Jogador: %s (ID:%d) Enviou: %s", sendername, playerid, (result));
			SendClientMessage(giveplayerid, COLOR_YELLOW, string);
			format(string, sizeof(string), "Particular Enviada para %s(ID:%d).",giveplayer,giveplayerid);
			SendClientMessage(playerid, COLOR_YELLOW, string);
			printf("Particular de %s para %s: %s", sendername,giveplayer,(result));
			return 1;
            }
	    	if(PlayerInfo[playerid][pAdmin] >= 1 && PlayerInfo[playerid][pHelper] <= 0)
	      	{
			format(string, sizeof(string), "Admin: %s (ID:%d) Enviou: %s", sendername, playerid, (result));
			SendClientMessage(giveplayerid, COLOR_YELLOW, string);
			format(string, sizeof(string), "Particular Enviada para %s(ID:%d).",giveplayer,giveplayerid);
			SendClientMessage(playerid, COLOR_GREEN, string);
			printf("Particular de %s para %s: %s", sendername,giveplayer,(result));
			return 1;
		    }
			if(PlayerInfo[playerid][pHelper] >= 1)
			{
			format(string, sizeof(string), "Helper: %s (ID:%d) Enviou: %s", sendername, playerid, (result));
			SendClientMessage(giveplayerid, COLOR_YELLOW, string);
			format(string, sizeof(string), "Particular Enviada para %s(ID:%d).",giveplayer,giveplayerid);
			SendClientMessage(playerid, COLOR_GREEN, string);
			printf("Particular de %s para %s: %s", sendername,giveplayer,(result));
			return 1;
			}
			}
		}
		else
		{
				format(string, sizeof(string), "   %d nгo й um jogador ativo.", giveplayerid);
				SendClientMessage(playerid, COLOR_GRAD1, string);
		}
		return 1;
	}
HELP PLZ
Reply
#2

isso n й erro й warning
na minha opiniao nao atrapalha em nada
Reply
#3

sim... quando botar o meu sv no host, ( que vai ser amanha ) vai atrapalhar, pois nao pode ter avisos e nenhum erro no gm ( й oque me dizem... )
Reply
#4

Isso junto a algum tipo de warning pode lhe atrapalhar sim, mas so esse warnings nao dao em nada da atй pra por online, se for por online opite pela,http://www.ourspace.com.br/ host de qualidade vai la!
Reply
#5

Organize seu cуdigo que o aviso irб ser corrigido.
Correto:
pawn Код:
if(condition)
{
    action();
    result();
}
Errado:
pawn Код:
if(condition)
{
    action();
  result();
}
Este realmente nгo atrapalha em nada, й sу o pawno dizendo que seu cуdigo й ilegнvel!
Vocк pode(e deve!) corrigir seu cуdigo como no exemplo acima ou apenas ignorar os avisos com(nenhum um pouco recomendado!):
pawn Код:
#pragma tabsize 0
Quote:
Originally Posted by THE_FALLEN
isso n й erro й warning
na minha opiniao nao atrapalha em nada
Avisos podem ser tгo ruins quanto erros(a diferenзa й que avisos permitem que o script rode), mas й sempre bom ter um cуdigo limpo.
Reply
#6

Nao to conseguindo... podia me mandar o codigo certinho? porque sou novato :S
Reply
#7

pawn Код:
if(strcmp(cmd, "/particular", true) == 0 || strcmp(cmd, "/par", true) == 0)
{
    if(gPlayerLogged[playerid] == 0)
        return SendClientMessage(playerid, COLOR_GREY, "   Vocк nгo estб Logado!");

    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
        return SendClientMessage(playerid, COLOR_GRAD2, "USE: (/par)ticular [ID/Nome] [texto]");

    giveplayerid = ReturnUser(tmp);
    if (IsPlayerConnected(giveplayerid))
    {
        if (HidePM[giveplayerid] == 1)
            return SendClientMessage(playerid, COLOR_GRAD1, "Este jogador tem as particulares bloqueadas !");

        if(giveplayerid != INVALID_PLAYER_ID)
        {
            if(PlayerInfo[playerid][pAdmin] < 1 && PlayerInfo[playerid][pHelper] < 0)
            {
                if(PlayerInfo[giveplayerid][pAdmin] == 0 && PlayerInfo[giveplayerid][pHelper] == 1)
                    return SendClientMessage(playerid, COLOR_GRAD1, "Vocк apenas pode mandar /par para um Administrador ou Helper!");
            }
            GetPlayerName(playerid, sendername, sizeof(sendername));
            GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
            new length = strlen(cmdtext);
            while ((idx < length) && (cmdtext[idx] <= ' '))
                idx++;

            new offset = idx;
            new result[256];
            while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
            {
                result[idx - offset] = cmdtext[idx];
                idx++;
            }
            result[idx - offset] = EOS;
            if(!strlen(result))
                return SendClientMessage(playerid, COLOR_GRAD2, "USE: (/par)ticular [ID/Nome] [texto]");

            if(PlayerInfo[playerid][pAdmin] == 0 && PlayerInfo[playerid][pHelper] == 0)
            {
                format(string, sizeof(string), "Jogador: %s (ID:%d) Enviou: %s", sendername, playerid, (result));
                SendClientMessage(giveplayerid, COLOR_YELLOW, string);
                format(string, sizeof(string), "Particular Enviada para %s(ID:%d).",giveplayer,giveplayerid);
                SendClientMessage(playerid, COLOR_YELLOW, string);
                printf("Particular de %s para %s: %s", sendername,giveplayer,(result));
                return 1;
            }
            if(PlayerInfo[playerid][pAdmin] >= 1 && PlayerInfo[playerid][pHelper] <= 0)
            {
                format(string, sizeof(string), "Admin: %s (ID:%d) Enviou: %s", sendername, playerid, (result));
                SendClientMessage(giveplayerid, COLOR_YELLOW, string);
                format(string, sizeof(string), "Particular Enviada para %s(ID:%d).",giveplayer,giveplayerid);
                SendClientMessage(playerid, COLOR_GREEN, string);
                printf("Particular de %s para %s: %s", sendername,giveplayer,(result));
                return 1;
            }
            if(PlayerInfo[playerid][pHelper] >= 1)
            {
                format(string, sizeof(string), "Helper: %s (ID:%d) Enviou: %s", sendername, playerid, (result));
                SendClientMessage(giveplayerid, COLOR_YELLOW, string);
                format(string, sizeof(string), "Particular Enviada para %s(ID:%d).",giveplayer,giveplayerid);
                SendClientMessage(playerid, COLOR_GREEN, string);
                printf("Particular de %s para %s: %s", sendername,giveplayer,(result));
                return 1;
            }
        }
    }
    else
    {
        format(string, sizeof(string), "   %d nгo й um jogador ativo.", giveplayerid);
        SendClientMessage(playerid, COLOR_GRAD1, string);
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)