Loose Indentation -
goantonio101 - 08.06.2010
Код:
}
}
}
}
}
if(PlayerInfo[i][pCarTime] > 0)
{
if(PlayerInfo[i][pCarTime] <= 0)
{
PlayerInfo[i][pCarTime] = 0;
}
else
{
PlayerInfo[i][pCarTime] -= 1;
I have a loose indentation will someone please fix it, it is : "if(PlayerInfo[i][pCarTime] > 0)"
Re: Loose Indentation -
ihatetn931 - 08.06.2010
Post the rest of the code, it's hard to find out where the indentation is when you can only see half the code
Re: Loose Indentation -
goantonio101 - 08.06.2010
ApplyAnimation(i,"PED", "WALK_DRUNK",4.0,0,1,0,0,0);
SetPlayerDrunkLevel(i, 10000);
PlayerDrunkTimeLeft[i] += 1;
if(PlayerDrunkTimeLeft[i] == 4)
{
PlayerDrunkTimeLeft[i] = 0;
PlayerDrunk[i] -= 1;
if(PlayerDrunk[i] < 5)
{
GameTextForPlayer(i, "~w~Drunk Effect Has~n~~p~Wore Off", 3500, 1);
SetPlayerDrunkLevel(i, 0);
}
}
}
}
}
if(PlayerInfo[i][pCarTime] > 0)
{
if(PlayerInfo[i][pCarTime] <= 0)
{
PlayerInfo[i][pCarTime] = 0;
}
else
{
PlayerInfo[i][pCarTime] -= 1;
}
}
Re: Loose Indentation -
Jonni8 - 08.06.2010
pawn Код:
}
}
}
}
}
if(PlayerInfo[i][pCarTime] > 0)
{
if(PlayerInfo[i][pCarTime] <= 0)
{
PlayerInfo[i][pCarTime] = 0;
}
else
{
PlayerInfo[i][pCarTime] -= 1;
ApplyAnimation(i,"PED", "WALK_DRUNK",4.0,0,1,0,0,0);
SetPlayerDrunkLevel(i, 10000);
PlayerDrunkTimeLeft += 1;
if(PlayerDrunkTimeLeft == 4)
{
PlayerDrunkTimeLeft = 0;
PlayerDrunk -= 1;
if(PlayerDrunk < 5)
{
GameTextForPlayer(i, "~w~Drunk Effect Has~n~~p~Wore Off", 3500, 1);
SetPlayerDrunkLevel(i, 0);
}
}
}
}
}
if(PlayerInfo[pCarTime] > 0)
{
if(PlayerInfo[pCarTime] <= 0)
{
PlayerInfo[pCarTime] = 0;
}
else
{
PlayerInfo[pCarTime] -= 1;
}
}
try again...
Re: Loose Indentation -
ViruZZzZ_ChiLLL - 08.06.2010
You don't have to worry Loose Indentations.
Its just means that you have a code that is
not aligned with others.
Example :
pawn Код:
public OnPlayerConnect(playerid)
{
GivePlayerMoney(playerid, 2000);
GivePlayerMoney(playerid, 2001);
GivePlayerMoney(playerid, 2002);
return 1;
}
See how the 2nd GivePlayerMoney is not aligned with the others?
Thats Loose Indentation. Don't worry though, it will not affect on
how the way you script functions
But, if your lazy enough just use this :
But
I don't recommend you to add that!
I
recommend you to fix the alignment of you code.