SA-MP Forums Archive
Why do people do it? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Why do people do it? (/showthread.php?tid=330148)



Why do people do it? - Joshb93 - 31.03.2012

Why would someone want to script putting the brackets infront of the line?

EX:
pawn Код:
if(PlayerInfo[playerid][pAdmin] == 1) {
Instead of:

pawn Код:
if(PlayerInfo[playerid][pAdmin] == 1)
{
Ive heard they do it to save lines..? Well, if that be the case, i cannot stand people who script like that, because i have to script the second way so that i can see if all of my brackets are there, and lined up.

Just posting this to see yalls opinions, so please dont flame/insult.


Re: Why do people do it? - captainjohn - 31.03.2012

Less lines in script?
Tidier?
Different peoples opinions?

I'm not really sure why people do it.
I myself prefer it to be like this:

pawn Код:
if(PlayerInfo[playerid][pAdmin] == 1)
{



Re: Why do people do it? - Joshb93 - 31.03.2012

Quote:
Originally Posted by captainjohn
Посмотреть сообщение
Less lines in script?
Tidier?
Different peoples opinions?

I'm not really sure why people do it.
I myself prefer it to be like this:

pawn Код:
if(PlayerInfo[playerid][pAdmin] == 1)
{
Yeah, me to. But in my opinion, i think it looks tidier this way. The other way makes it look sloppy to me.


Re: Why do people do it? - CyNiC - 31.03.2012

If a scripter can understand perfectly your code doing things like this, what problem?

Each has its your preferable indentation style.


Re: Why do people do it? - Randyy - 31.03.2012

if (PlayerInfo [playerid] [pAdmin] == 1)
{

because it seems much neater