Loose Indentation Help. -
nicholasramdhan - 28.03.2015
So, I got this FS. I had about 20 loose indentations, I fixed them all, now I only got 2 left. I tried multiple things, I just can't seem to get it. So, if any of you could please help me with this. I don't know what's causing the loose indentation.
Code:
Код:
function xReactionProgress()
{
switch(xTestBusy)
{
case true:
{
new
string[250]
;
format(string, sizeof(string), "No one has won the reaction test. New one starting in %d minutes.", (TIME/60000));
SendClientMessageToAll(PURPLE, string);
xReactionTimer = SetTimer("xReactionTest", TIME, 1);
}
}
return 1;
}
Re: Loose Indentation Help. -
Vince - 28.03.2015
I don't know whether the forum messes up the indentation or you truly can't see it. After each opening brace you ident the following code by 1 tab until you encounter a closing brace. You can't simply have two closing braces beneath each other on the same level ...
Re: Loose Indentation Help. -
nicholasramdhan - 28.03.2015
I just changed it to this, still the two warnings:
Код:
function xReactionProgress()
{
switch(xTestBusy)
{
case true:
{
new
string[250]
;
format(string, sizeof(string), "No one has won the reaction test. New one starting in %d minutes.", (TIME/60000));
SendClientMessageToAll(PURPLE, string);
xReactionTimer = SetTimer("xReactionTest", TIME, 1);
}
}
return 1;
}
Re: Loose Indentation Help. -
mamorunl - 28.03.2015
This is always the problem with forums and tabs. Best way to get around that is by just posting a screenshot of what is happening. Really weird stuff.
Ninja-edit: Your return 1; is even way off. Nothing is indented properly
Re: Loose Indentation Help. -
Smileys - 28.03.2015
before:
pawn Код:
function xReactionProgress()
{
switch(xTestBusy)
{
case true:
{
new
string[250]
;
format(string, sizeof(string), "No one has won the reaction test. New one starting in %d minutes.", (TIME/60000));
SendClientMessageToAll(PURPLE, string);
xReactionTimer = SetTimer("xReactionTest", TIME, 1);
}
}
return 1;
}
After:
pawn Код:
function xReactionProgress()
{
switch(xTestBusy)
{
case true:
{
new
string[250]
;
format(string, sizeof(string), "No one has won the reaction test. New one starting in %d minutes.", (TIME/60000));
SendClientMessageToAll(PURPLE, string);
xReactionTimer = SetTimer("xReactionTest", TIME, 1);
}
}
return 1;
}
see the difference?
Re: Loose Indentation Help. -
maximthepain - 28.03.2015
copy and paste your full code from the function to the last bracket here
http://codegenerators.pl/ click indend and then copy paste the function back and replace it in the script, this site indending scripts for you.
Re: Loose Indentation Help. -
nicholasramdhan - 28.03.2015
Thank you so much

+rep