Simple Problem, - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Simple Problem, (
/showthread.php?tid=190271)
Simple Problem, -
lewismichaelbbc - 14.11.2010
Here are the warnings/ Errors:
pawn Код:
C:\Users\Lewis Ryan\Desktop\Roleplay Server Backup\gamemodes\sarp.pwn(20740) : warning 217: loose indentation
C:\Users\Lewis Ryan\Desktop\Roleplay Server Backup\gamemodes\sarp.pwn(20763) : warning 217: loose indentation
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
2 Warnings.
It is just loose indentation, and i guess that means the brackets...
Here is my script:
pawn Код:
if(strcmp(cmd, "/helperon", true) == 0) //Tourist Camera
{
for(new i; i < MAX_PLAYERS; i++)
if(IsPlayerConnected(playerid))
{
{
if(IsPlayerConnected(i))
{
ShowPlayerNameTagForPlayer(i, playerid, 0);
}
{
AttachObjectToPlayer( helper, playerid, 0, 0.0, 1.5, 0, 0, 0 );
AttachObjectToPlayer( helperaddon, playerid, 0, 0.0, -1.5, 0, 0, 0 );
PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
Delete3DTextLabel(DutyLabel[playerid]);
DutyLabel[playerid] = Create3DTextLabel("Ask Me For Help!",0xFF9900AA,0,0,0,100,-1,1);
Attach3DTextLabelToPlayer(DutyLabel[playerid], playerid, 0,0,0.25);
return 1;
}
}
}
}
On This Line: 20740:
it is just a bracket, where do i need to put it?
That bracket is on the 11th line in the above script.
Thanks For The Help!
Re: Simple Problem, -
Gh0sT_ - 14.11.2010
#pragma tabsize 0 on top of script.
Re: Simple Problem, -
Hiddos - 14.11.2010
Quote:
Originally Posted by Gh0sT_
#pragma tabsize 0 on top of script.
|
Gods give me strength.. please..
A loose indentation means your code isn't indented well.
An example of bad indentation:
pawn Код:
if(IsplayerConnected(playerid)
{
print("Connected");
new string[128];
GetPlayerName(playerid, string, sizeof string);
format(string, sizeof string, "Hello %s!", string);
}
Well indented:
pawn Код:
if(IsplayerConnected(playerid)
{
print("Connected");
new string[128];
GetPlayerName(playerid, string, sizeof string);
format(string, sizeof string, "Hello %s!", string);
}
Notice how the code is now on equal horizontal lines? That's well indented. Using #pragma tabsize 0 only increases the problems.