Your preferred scripting methods
#6

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.
Reply


Messages In This Thread
Your preferred scripting methods - by Emmet_ - 03.12.2013, 04:22
Re: Your preferred scripting methods - by Djole1337 - 03.12.2013, 05:15
Re: Your preferred scripting methods - by Bakr - 03.12.2013, 05:17
Re: Your preferred scripting methods - by Kyosaur - 03.12.2013, 05:27
Re: Your preferred scripting methods - by Pottus - 03.12.2013, 06:02
Re: Your preferred scripting methods - by Slice - 03.12.2013, 06:47
Re: Your preferred scripting methods - by iZN - 03.12.2013, 07:02
Re: Your preferred scripting methods - by Emmet_ - 03.12.2013, 08:04
Re: Your preferred scripting methods - by Slice - 03.12.2013, 09:47
Re: Your preferred scripting methods - by Kyle - 03.12.2013, 13:28

Forum Jump:


Users browsing this thread: 2 Guest(s)