![]() |
Formatting
What do you people see as the correct way to format a script?
I personally see it this way: 1 line: if(playerenters) setcharprop #c,hi; >1 lines: NPC Code: What about you people? Maybe using correct formatting shouldn't be a rule but maybe encouraged to be used more often? I personally find it annoying to see scripts that aren't formatted that way =/ |
Ah, I think you're wrong, but i don't care. Correct is in the eye of the beholder x.X Here is what I do, and I find it QUITE easy to read and simple enough:
NPC Code: I think that it looks a bit more confusing when you have the opening { on the same line as the if statement. If you have a long if statement it gets harder to read =/ ---Shifter |
They teach you to seperate cold blocks from the conditional statements... Personally I find that quite confusing to do
NPC Code: I do NPC Code: |
NPC Code: |
I prefer the "graal style" like what falcor, python, and torankusu did, but it doesn't make much difference as long as it is indented properly so I can read it.
|
Quote:
|
Quote:
|
Quote:
|
Re: Formatting
Quote:
|
I personally use this style:
NPC Code: Even if it is only one command, I use { }'s. |
NPC Code: |
LOL, I seem to be the only one who doesn't put the { on the statement =/ Oh well, mine is still easy to read due to I indent. Regardless if there is only one command, I almost ALWAYS try and put in { and } so that in case I need to edit it l8er I won't have to add them.
---Shifter |
| All times are GMT +2. The time now is 07:49 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.