05.07.2012, 12:43
Quote:
If you have to explain what a function does because the name does not cover it, then your script is not "clean and good" pretty much by definition! Better names would be "CommandDeniedMessage" or "ShowNotAllowedMessage".
"SCMA" - "ShowCarlMyAmmo", "SetCarManualAuto", "SpaceCowboysMayAttack"? The FIRST rule to making a clean script is a clean, consistent, and informative, naming scheme. Everything else is secondary. What you are talking about is how to save half a second when typing something, which is pretty much the exact opposite of writing clean code! |
The player won't see if I use nal or NotAllowedMessage anyway, so I think you just understood my topic wrong

Writing clean code can be seen as writing clean code to read, or writing clean code to play.
Clean code to play is where you as player have the feeling and experience that everything is organized and looking good, while a scripter would look at the code and would want to understand every line within a second, without thinking of the definition.
But considering I am the only person that ever worked on my own script, I don't think I need to worry about if SCMA means SendClientMessageToAll, ShowCarlMyAmmo, or whatever because I'v defined it myself.
Get what I mean?