Is this wrong?
#1

People have said my indentations make my scripts look like shit, and messy. I think it looks neater this way, and unique :P I don't get warnings on it either, so what do you guys think?

pawn Код:
CMD:mycommand(playerid, params[])
    {
    //dosomething
    }
instead of the usual way,

pawn Код:
CMD:mycommand(playerid, params[]])
{
    //dosomething
}
Is my way acceptable to you guys? Or just plain wrong?
Reply
#2

I will test it out, just to be sure.

EDIT:
Tried out

pawn Код:
CMD:test(playerid, params[])
       {
              return 1;
       }
And it compiled fine. So, as long as the first opening/closing brackets are there, the script will compile fine
Reply
#3

Whatever works for you.
Reply
#4

Personally, I find it neater if your first set of opening/closing brackets are indented, it also makes it easier to find things if you're scrolling through the script. (Which doesn't really make a difference as most people just use [CTRL] + [F].
Another thing, although most people might not care, it is easier for people to read code/help with requests on the forums if they are indented properly.
Reply
#5

That's how I do it. Who said that it was ugly the way you do it? Lol.
Reply
#6

My style is:

Код:
stock function_name(){
  //code
}
How do you like it?
Reply
#7

Quote:
Originally Posted by Baltazar
Посмотреть сообщение
My style is:

Код:
stock function_name(){
  //code
}
How do you like it?
too PHP D:
Reply
#8

Quote:
Originally Posted by Mattakil
Посмотреть сообщение
too PHP D:
I do it that way aswell usually. (:
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)