Anti Vehicle Crash
#1

Greetings,

I have this warning:
Код:
C:\Documents and Settings\Administrador\Escritorio\Gang Wars\filterscripts\AntiCrash.pwn(26) : warning 217: loose indentation
In this line:

pawn Код:
if(!IsComponentidCompatible(GetVehicleModel(vehicleid), componentid)) RemoveVehicleComponent(vehicleid, componentid);
Actually I don`t know what mean "Loose Indentation". If some one can help me with this, please.


Regards,
Pablo.
Reply
#2

Loose Indentation
pawn Код:
COMMAND;
 Loose Indentation;// Commands not in line
COMMAND;
return 1;
Reply
#3

Show me more of your code like from the beginning of the line to the end of the line lets say lines 15-30
Reply
#4

pawn Код:
public OnVehicleMod(playerid, vehicleid, componentid)
{
    switch(componentid)
        {
            case 1008..1010: if(IsPlayerInInvalidNosVehicle(playerid)) RemoveVehicleComponent(vehicleid, componentid);
        }
        if(!IsComponentidCompatible(GetVehicleModel(vehicleid), componentid)) RemoveVehicleComponent(vehicleid, componentid);
        return 1;
}
Reply
#5

Its out of line. is Dis:
Код:
case 1008..1010: if(IsPlayerInInvalidNosVehicle(playerid)) RemoveVehicleComponent(vehicleid, componentid);[
+
Код:
switch(componentid)
Reply
#6

More errors, if I use that

EDIT: I just need to know what is "Loose Indenation" and how to take off this warn
Reply
#7

Align them. Use TAB or shift+TAB to ident.
Reply
#8

like dis:

Код:
CMD:test(playerid, params[])
{
    SendClientMessage(playerid, 0xFF0000AA, "Testing0");
    SendClientMessage(playerid, 0xFF0000AA, "Testing1");
    SendClientMessage(playerid, 0xFF0000AA, "Testing2");
     SendClientMessage(playerid, 0xFF0000AA, "Testing3");
	return 1;
}
SendClientMessage(playerid, 0xFF0000AA, "Testing3"); out of line
That's loose indentation
Reply
#9

Still having this warning:

Код:
C:\Documents and Settings\Administrador\Escritorio\Gang Wars\filterscripts\AntiCrash.pwn(26) : warning 217: loose indentation
----------------------0----------------------------------

Quote:
Originally Posted by DerickClark
Посмотреть сообщение
like dis:

Код:
CMD:test(playerid, params[])
{
    SendClientMessage(playerid, 0xFF0000AA, "Testing0");
    SendClientMessage(playerid, 0xFF0000AA, "Testing1");
    SendClientMessage(playerid, 0xFF0000AA, "Testing2");
     SendClientMessage(playerid, 0xFF0000AA, "Testing3");
	return 1;
}
SendClientMessage(playerid, 0xFF0000AA, "Testing3"); out of line
That's loose indentation
This isn`t a command. THIS IS WHAT I WANT
Reply
#10

pawn Код:
public OnVehicleMod(playerid, vehicleid, componentid)
{
    switch(componentid)
        {
            case 1008..1010: if(IsPlayerInInvalidNosVehicle(playerid)) RemoveVehicleComponent(vehicleid, componentid);
        }
        if(!IsComponentidCompatible(GetVehicleModel(vehicleid), componentid)) RemoveVehicleComponent(vehicleid, componentid);
        return 1;
}
Look at the alignment.

Now look again:

pawn Код:
public OnVehicleMod(playerid, vehicleid, componentid)
{
    switch(componentid)
    {
        case 1008..1010: if(IsPlayerInInvalidNosVehicle(playerid)) RemoveVehicleComponent(vehicleid, componentid);
    }
    if(!IsComponentidCompatible(GetVehicleModel(vehicleid), componentid)) RemoveVehicleComponent(vehicleid, componentid);
    return 1;
}
Code between the two braces should be indented at the same level.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)