Are stocks and functions faster in a include or in pawn?
#1

Misunderstood everything.
Reply
#2

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).
Reply
#3

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

"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.
Reply
#5

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


Forum Jump:


Users browsing this thread: 1 Guest(s)