Are stocks and functions faster in a include or in a plugin? -
SickAttack - 27.06.2014
Misunderstood everything.
Re: Are stocks and functions faster in a include or in pawn? - Emmet_ - 27.06.2014
An include is made in PAWN, and #include only adds code from the inclusion file into the script, so it would be the same speed (unless I misunderstood the question).
AW: Are stocks and functions faster in a include or in pawn? -
Mellnik - 27.06.2014
The "stock" keyword just tells the compiler to not throw a warning if the defined variable or function is not used in the script. Therefore "stock" can be omitted in most cases which makes the function a naked one.
fordwarded functions can be called by amx_Exec from the amx api inside a plugin or the samp server itself.
Re: Are stocks and functions faster in a include or in pawn? -
Kar - 28.06.2014
"I would like to know if stocks and functions (forward/public) are faster in a include or in pawn."
In pawn? The correct question would be from a plugin or from your pawn script.
Includes are technically in the pawn script, the line where it says "#include w/e" technically just replaces that line with everything in the include so it's basically in your script but only visible externally.
Re: AW: Are stocks and functions faster in a include or in pawn? -
Mauzen - 28.06.2014
Quote:
Originally Posted by Mellnik
The "stock" keyword just tells the compiler to not throw a warning if the defined variable or function is not used in the script. Therefore "stock" can be omitted in most cases which makes the function a naked one.
|
Actually it doesnt just supress the warnings, but removes the whole function/variable from the script for compiling if it isnt used. This then reduces the amx size. Using stocks is extremely important for utility includes that provide a large number of different functions.