Loose Indentation Help.
#1

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;
    }
Reply
#2

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 ...
Reply
#3

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;
   }
Reply
#4

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
Reply
#5

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?
Reply
#6

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.
Reply
#7

Thank you so much +rep
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)