Posts: 1,773
Threads: 47
Joined: Jan 2015
Reputation:
0
Its not a personal opinion or crap. I know it doesn\'t effect the performance but the tutorial tells you how to write code properly with convention.
You could also argue about #define then, its just text replacement, doesn\'t effect the performance anyway.
Posts: 1,046
Threads: 29
Joined: Mar 2010
The stock keyword should be constrained to libraries only, and avoided by gamemodes and filterscripts. stock is a keyword to remove the warning for unused functions. A script is not going to use all function of a library, so it\'s acceptable that such warning can be avoided. Inside a gamemode or filterscript it is good to know what functions are unused to avoid garbage code produced by accident or deprecation, which improves mainainability and readability of a script.
Posts: 1,046
Threads: 29
Joined: Mar 2010
If you are talking boiler plates in form of functions provided by a set of includes, then by definition it is a library. If you mean boiler plates in form of code snippets posted at forums or github/gist, then you shouldn\'t follow an arguably wrong code convention. Either way why should it be constrained to the stock modifier to help find function definitions? If you use a proper IDE, then you can find any code definition assotiated to your script.
Posts: 15,941
Threads: 0
Joined: Jun 2008
Stock suppresses the warning when a function isn\'t used.
If you are writing a library, you are providing a set of optional functions to do different things. For any given use, not all of those functions may be required, thus a warning would be annoying. Hence stock in libraries.
If you are writing a mode, that is a single set piece of functionality. Everything is there for a reason and should do something. If you have a function in a mode that isn\'t used that\'s a mistake. Thus without stock the compiler will point out your mistake so you can either call it or remove it.
So yes, using stock in a mode is objectively wrong, it isn\'t just the opinion of a few members.
Posts: 15,941
Threads: 0
Joined: Jun 2008
Err, what? If it shouldn\'t be there, telling people so is correct. Warnings are the compiler trying to tell you about problems with your code, ignoring them is ignoring useful diagnostics.
Posts: 15,941
Threads: 0
Joined: Jun 2008
It will correctly display warnings.
Posts: 11
Threads: 3
Joined: Jul 2018
Reputation:
0
Eyvallah reis, bakma şerefsizlere. Зamur atıyorlar sana.
Posts: 2
Threads: 0
Joined: Jun 2018
Reputation:
0
Paylaşım iзin teşekkьrler Jensenn. Oldukзa faydalı bir sistem.