Cant fix this loose indentation -.-
#1

Code:
Код:
stock CountLockers()
{
     new Lcount;
     for(new x=1; x < MAX_LOCKERS_POINT;x++)
     {
	new path[100];
	for(new lockerid = 1; lockerid < MAX_LOCKERS_POINT; lockerid++)
	{
		format(path,sizeof(path),"/Factions/Locker%d.ini", lockerid);
		if(fexist(path))
	{
		LockersPointCreated[lockerid] = 1;
		return 1;
	}
		else
	{
		LockersPointCreated[lockerid] = 0;
		return 1;
		}
	}
	}
	return Lcount;
}
I cannot fix this loose indentation, so annoying -.-

Can anyone fix it please, the loose indentation is on this line:
Код:
return Lcount;
+rep to anyone who can fix it
Reply
#2

Код:
stock CountLockers() {
    new Lcount;
    for(new x=1; x < MAX_LOCKERS_POINT;x++) {
		new path[100];
		for(new lockerid = 1; lockerid < MAX_LOCKERS_POINT; lockerid++) {
			format(path,sizeof(path),"/Factions/Locker%d.ini", lockerid);
			if(fexist(path)) {
				LockersPointCreated[lockerid] = 1;
				return 1;
			} else {
				LockersPointCreated[lockerid] = 0;
				return 1;
			}
		}
	}
	return Lcount;
}
this is how it should look like
also, if you are bad with indentation, use #pragma tabsize 0, even if it's not recommended
Reply
#3

Код:
stock CountLockers()
{
     new Lcount;
     for(new x=1; x < MAX_LOCKERS_POINT;x++)
     {
	new path[100];
	for(new lockerid = 1; lockerid < MAX_LOCKERS_POINT; lockerid++)
	{
		format(path,sizeof(path),"/Factions/Locker%d.ini", lockerid);

		if(fexist(path))
                {
		        LockersPointCreated[lockerid] = 1;
		        return 1;
	        }
	        else
	        {
		        LockersPointCreated[lockerid] = 0;
		        return 1;
		}
	}
     }
     return Lcount;
}
Reply
#4

Quote:
Originally Posted by Seven_of_Nine
Посмотреть сообщение
Код:
stock CountLockers() {
    new Lcount;
    for(new x=1; x < MAX_LOCKERS_POINT;x++) {
		new path[100];
		for(new lockerid = 1; lockerid < MAX_LOCKERS_POINT; lockerid++) {
			format(path,sizeof(path),"/Factions/Locker%d.ini", lockerid);
			if(fexist(path)) {
				LockersPointCreated[lockerid] = 1;
				return 1;
			} else {
				LockersPointCreated[lockerid] = 0;
				return 1;
			}
		}
	}
	return Lcount;
}
this is how it should look like
also, if you are bad with indentation, use #pragma tabsize 0, even if it's not recommended
Thanks, fixed it!

Repped!
Reply
#5

Quote:
Originally Posted by Seven_of_Nine
Посмотреть сообщение
this is how it should look like
also, if you are bad with indentation, use #pragma tabsize 0, even if it's not recommended
Do you know why its not recommended ?
Reply
#6

Quote:
Originally Posted by ******
Посмотреть сообщение
Don't EVER do this! And Seven_of_Nine, telling people to do it is by definition recommending it!
Mind explaining why.
Reply
#7

Quote:
Originally Posted by Riddy
Посмотреть сообщение
Mind explaining why.
Use it instead :
http://dracoblue.net/tidy/pawn/
Reply
#8

Quote:
Originally Posted by xkirill
Посмотреть сообщение
I've never even use #pragma tabsize 0, just wondered why it isnt recommended.
Reply
#9

Quote:
Originally Posted by Riddy
Посмотреть сообщение
I've never even use #pragma tabsize 0, just wondered why it isnt recommended.
Because
pawn Код:
#pragma tabsize 0
avoids every warning big one or minor one.
Reply
#10

Quote:
Originally Posted by xkirill
Посмотреть сообщение
That one is broken try to use this one http://codegenerators.pl/indent it works like a charm for me.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)