Loose Indentation?
#1

C:\Documents and Settings\Phil\Desktop\SAMP_Server\gamemodes\vx-rp.pwn(2800) : warning 217: loose indentation
C:\Documents and Settings\Phil\Desktop\SAMP_Server\gamemodes\vx-rp.pwn(2814) : warning 217: loose indentation
C:\Documents and Settings\Phil\Desktop\SAMP_Server\gamemodes\vx-rp.pwn(2815) : warning 217: loose indentation
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


3 Warnings.



-------------------------------------

(2800) format(szQueryOutput, sizeof(szQueryOutput), "DELETE FROM bans WHERE playerNameBanned = '%s'", szPlayerName);

(2814) GetPVarString(extraid, "playerNameUnban", szPlayerName2, MAX_PLAYER_NAME);

(2815) GetPlayerName(extraid, szPlayerName, MAX_PLAYER_NAME);


Any help would be muchly appreciated thankyou!
Reply
#2

fix your indentation.

If you don't know how to fix that then you should seriously use ****** once in a while.
Reply
#3

We need the entire chunk of code to fix it.

Basically it's telling you that it's not aligned properly.
Reply
#4

If they annoy you, just use

pawn Код:
#pragma tabsize 0
Reply
#5

I only have one warning now on line 2800

}
case THREAD_FINALIZE_BAN: return Kick(extraid);
case THREAD_CHECK_PLAYER_NAME_BANNED: {
mysql_store_result();

if(mysql_num_rows() >= 1) {
GetPVarString(extraid, "playerNameUnban", szPlayerName, MAX_PLAYER_NAME);

(2800) format(szQueryOutput, sizeof(szQueryOutput), "DELETE FROM bans WHERE playerNameBanned = '%s'", szPlayerName);
mysql_query(szQueryOutput, THREAD_FINALIZE_UNBAN, extraid);
}
else {
SendClientMessage(extraid, COLOR_GREY, "The specified player name is not banned.");
}

mysql_free_result();
}
Reply
#6

Use [pawn] tags, please.
Reply
#7

Sorted now thankyou very much for your help!!!
Reply
#8

Quote:
Originally Posted by ******
Посмотреть сообщение
Then you can annoy every coder in the world when you want help!

Don't do this - learn to code properly!


What else could I say? No-one forces you to use tabsize 0, just a simple way to get rid of them.

I do not use it if you wanted to know
Reply
#9

Indentation is simple.

Example:
Код:
public function(playerid, something)
{ 
	doSomething(playerid, something);
	if(something == 1)
	{ 
	    print("1");
	}
	else 
	{
	    print("nope.");
	}
	return 1;
}
just makes the code look clean and easy to read, scripts without indentation look very ugly.

use TAB to make it accurate
Reply
#10

Quote:
Originally Posted by spedico
Посмотреть сообщение
just makes the code look clean and easy to read, scripts without indentation look very ugly.
That's the point
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)