03.12.2013, 06:47
1) I only use enum for sequential constants or array indexes.
2) I tend to avoid huge player enums and such, especially since everything is split up into multiple include files (pseudo-modules).
3) Only make a function public if you actually need it.. Also, stock is best for large modules/includes that has unused functions. If you know a function is used, it shouldn't be a stock. It's no big deal if it is, though.
4) dcmd? strcmp? This is not 2007.
5) a - Consistency is good.
6) I only use ternary where it saves space and maintains readability.
7) a
8) a/b - If the total length is less than 80 characters I usually put it on one line, otherwise one variable for each line.
9) b/c - Depends on whether I'm testing for a static value or something else.. Apples and oranges.
10) b - I hope that question was a joke..
11) b - Only use format if you're actually formatting something!
12) NOT a - Don't use format to copy strings.
13) a - Strings are zero-terminated - anything after the first NULL-character is completely irrelevant to the string.
2) I tend to avoid huge player enums and such, especially since everything is split up into multiple include files (pseudo-modules).
3) Only make a function public if you actually need it.. Also, stock is best for large modules/includes that has unused functions. If you know a function is used, it shouldn't be a stock. It's no big deal if it is, though.
4) dcmd? strcmp? This is not 2007.
5) a - Consistency is good.
6) I only use ternary where it saves space and maintains readability.
7) a
8) a/b - If the total length is less than 80 characters I usually put it on one line, otherwise one variable for each line.
9) b/c - Depends on whether I'm testing for a static value or something else.. Apples and oranges.
10) b - I hope that question was a joke..
11) b - Only use format if you're actually formatting something!
12) NOT a - Don't use format to copy strings.
13) a - Strings are zero-terminated - anything after the first NULL-character is completely irrelevant to the string.