06.01.2018, 22:40
I mean, it all depends on how you want to organize your gamemode. Some people might tell you that it is not recommended to use the stock keyword but as I said it depends. The only thing the "stock" keyword does is inform the compiler that it must include the function if the function is used. If the function is not used then the pawn parser can simply ignore the function. As the PAWN language guide (which you should probably read by the way) says:
Quote:
Stock functions allow a compiler or interpreter to optimize the memory footprint and the file size of a (compiled) pawn program: any stock function that is not referred to, is completely skipped —as if it were lacking from the source file. A typical use of stock functions, hence, is in the creation of a set of “library” functions. A collection of general purpose functions, all marked as “stock” may be put in a separate include file, which is then included in any pawn script. Only the library functions that are actually used get “linked” in. |