[Tutorial] Update Spectating Status - The solution!
#9

Quote:
Originally Posted by Excel™
View Post
Code:
UpdateSpectatingStatus
Not used in calling nor in timers, so why not this is stock function -_-

Code:
public OnPlayerCommandText(playerid, cmdtext[])
Why not use zcmd standards

Code:
strcmp
This is slow as he'll and thats why people recommend zcmd!

Code:
strtok
Another slow motion there, implement sscanf!
Excel, "stock" and a function is 2 different things.
Stock will make the compiler ignore something if it's not used in your script, thereby also hiding warnings/errors, and not including it in your .amx file.

Example of a normal function:
pawn Code:
FuncName(parameters)
Using stock:
pawn Code:
stock FuncName(parameters)
Or:
pawn Code:
new stock VariableName;
Haven't used stock for anything else, but you might be able to use it for more.

I believe that public functions can be called between filterscripts etc. by adding it like this:
pawn Code:
public FuncName(parameters)
Thereby, "public" and "stock" are 2 different add-ons.
But in that example, both "stock" and "public" is useless, unless you wanna use it between scripts.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)