[Ajuda] Como resolve esses wans?
#1

Код:
BCL.pwn(3241) : warning 217: loose indentation
BCL.pwn(3243) : warning 217: loose indentation
BCL.pwn(3251) : warning 217: loose indentation
BCL.pwn(3252) : warning 217: loose indentation
BCL.pwn(3255) : warning 217: loose indentation
BCL.pwn(3258) : warning 217: loose indentation
BCL.pwn(3261) : warning 217: loose indentation
Код:
3243 - GetPlayerArmour(damagedid, ARMOR);
3251 - SetPlayerArmour(damagedid, 0.0);
3252 - SetPlayerHealth(damagedid, HEALTH);
3255 - ARMOR = ARMOR - amount;
3258 - if(ARMOR < 1)
3261 - SetPlayerHealth(damagedid, HEALTH);
Obrigado
Reply
#2

Resolve-se identando o cуdigo, ou seja, organizando isto, por exemplo :


pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
  {
           if(!strcmp(cmdtext, "/comando", true))
     {
        return 1;
  }
        if(!strcmp(cmdtext, "/comando2", true))
      {
            return 1;
            }
    return 0;
}

De modo que fique assim depois:


pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/comando", true))
    {
        return 1;
    }
    if(!strcmp(cmdtext, "/comando2", true))
    {
        return 1;
    }
    return 0;
}


Espero ter ajudado .
Reply
#3

:S:S obrigado masi a questгo й que nao se trata de um comando e sim de um sistema de lag na skin
Este й o sistema ja pronto aliais quem quiser pode copiar tambйm ^^
Код:
public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid)
    {
        if(GetPlayerTeam(playerid) != GetPlayerTeam(damagedid))
            {
            if(damagedid != INVALID_PLAYER_ID)
            {
                    new Float:HEALTH;
                            new Float:ARMOR;
                            new Float:DAMAGE;
                    GetPlayerArmour(damagedid, ARMOR);
                    GetPlayerHealth(damagedid, HEALTH);
                    if(ARMOR > 0.5)
                    {
                    if(amount > ARMOR)
                    {
                                    DAMAGE = amount - ARMOR;
                                    HEALTH = HEALTH - DAMAGE;
                        SetPlayerArmour(damagedid, 0.0);
                                    SetPlayerHealth(damagedid, HEALTH);
                                    return 1;
                    }
                                ARMOR = ARMOR - amount;
                                SetPlayerArmour(damagedid, ARMOR);
                        }
                if(ARMOR < 1)
                        {
                    HEALTH = HEALTH - amount;
                            SetPlayerHealth(damagedid, HEALTH);
                        }
            }
        }
        return 1;
    }
Reply
#4

pawn Код:
public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid)
{
    if(GetPlayerTeam(playerid) != GetPlayerTeam(damagedid))
    {
        if(damagedid != INVALID_PLAYER_ID)
        {
            new Float:HEALTH, ARMOR, DAMAGE;
            GetPlayerArmour(damagedid, ARMOR);
            GetPlayerHealth(damagedid, HEALTH);
            if(ARMOR > 0.5)
            {
                if(amount > ARMOR)
                {
                    DAMAGE = amount - ARMOR;
                    HEALTH = HEALTH - DAMAGE;
                    SetPlayerArmour(damagedid, 0.0);
                    SetPlayerHealth(damagedid, HEALTH);
                    return 1;
                }
                ARMOR = ARMOR - amount;
                SetPlayerArmour(damagedid, ARMOR);
            }
            if(ARMOR < 1)
            {
                HEALTH = HEALTH - amount;
                SetPlayerHealth(damagedid, HEALTH);
            }
        }
    }
    return 1;
}
Reply
#5

Compilo tinino vlw *-*
Reply
#6

pawn Код:
public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid)
{
    if(GetPlayerTeam(playerid) != GetPlayerTeam(damagedid))
    {
        if(damagedid != INVALID_PLAYER_ID)
        {
            new Float:HEALTH;
            new Float:ARMOR;
            new Float:DAMAGE;
            GetPlayerArmour(damagedid, ARMOR);
            GetPlayerHealth(damagedid, HEALTH);
            if(ARMOR > 0.5)
            {
                if(amount > ARMOR)
                {
                    DAMAGE = amount - ARMOR;
                    HEALTH = HEALTH - DAMAGE;
                    SetPlayerArmour(damagedid, 0.0);
                    SetPlayerHealth(damagedid, HEALTH);
                    return 1;
                }
                ARMOR = ARMOR - amount;
                SetPlayerArmour(damagedid, ARMOR);
            }
            if(ARMOR < 1)
            {
                HEALTH = HEALTH - amount;
                SetPlayerHealth(damagedid, HEALTH);
            }
         }
     }
     return 1;
}
Reply
#7

Vocк pode usar o pragma ou identar o cmd com a ferramenta de identaзгo http://www.jotaquery.com.br/ferramentas/identar/


й so colocar o codigo lб e clicar para identar depois e so colocar no gamemode
Reply
#8

Quote:
Originally Posted by gabrielloko157
Посмотреть сообщение
Vocк pode usar o pragma ou identar o cmd com a ferramenta de identaзгo http://www.jotaquery.com.br/ferramentas/identar/


й so colocar o codigo lб e clicar para identar depois e so colocar no gamemode

recomendo usar estб ferramenta

http://tabulador.medianewsonline.com/

alйm de tabular seus cуdigos ela anбlisa se а "{", "}" a mais ou a menos em seu cуdigo!
Reply
#9

warnings de LOOSE IDENTATION significa que o seu texto estб mal organizado, se puder organize, se tiver preguiзa apenas cole o seguinte codigo no topo do gm (Abaixo das includes)

Код:
#pragma tabsize 0
se ajudei agradeзa
Reply
#10

Quote:
Originally Posted by Designer Vibe02
Посмотреть сообщение
warnings de LOOSE IDENTATION significa que o seu texto estб mal organizado, se puder organize, se tiver preguiзa apenas cole o seguinte codigo no topo do gm (Abaixo das includes)

Код:
#pragma tabsize 0
se ajudei agradeзa
Nгo recomendo.
Prefiro indentar meu cуdigo!
Deixar ele organizado sem usar isso!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)