Loose Indentation? -
Phil_Cutcliffe - 21.12.2011
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!
Re: Loose Indentation? -
SchurmanCQC - 21.12.2011
fix your indentation.
If you don't know how to fix that then you should seriously use ****** once in a while.
Re: Loose Indentation? -
Eric - 21.12.2011
We need the entire chunk of code to fix it.
Basically it's telling you that it's not aligned properly.
Re: Loose Indentation? -
Jakku - 21.12.2011
If they annoy you, just use
Re: Loose Indentation? -
Phil_Cutcliffe - 21.12.2011
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();
}
Re: Loose Indentation? -
Eric - 21.12.2011
Use [pawn] tags, please.
Re: Loose Indentation? -
Phil_Cutcliffe - 21.12.2011
Sorted now thankyou very much for your help!!!
Re: Loose Indentation? -
Jakku - 21.12.2011
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
Re: Loose Indentation? -
spedico - 21.12.2011
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
Re: Loose Indentation? -
Jakku - 21.12.2011
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