What is the function, stock?
#8

Quote:
Originally Posted by SickAttack
View Post
I'm not quite sure why the explanation wasn't enough, but...

Let's say we have this function:
pawn Code:
stock Function(a)
{
    if(a)
    {
        return 1;
    }
    return 0;
}
If I use the function in OnPlayerConnect:
pawn Code:
Function(0);
The function will be added to the .amx file.

If the function isn't used and has stock, it won't be added to the .amx file and it won't give you a warning. It will only exist in the source code (.pwn).

If the function is like below (without stock) and isn't used, instead:
pawn Code:
Function(a)
{
    if(a)
    {
        return 1;
    }
    return 0;
}
You'll get a warning.

If it is used, you won't get a warning.

- Stock makes things that use it lack from the compiled source.
I get it now! Thank you SickAttack!
Reply


Messages In This Thread
What is the function, stock? - by Gorgeousmaniac - 22.09.2016, 17:52
Re: What is the function, stock? - by MrViolence101 - 22.09.2016, 17:54
Re: What is the function, stock? - by SickAttack - 22.09.2016, 19:14
Re: What is the function, stock? - by Gorgeousmaniac - 23.09.2016, 02:43
Re: What is the function, stock? - by FreAkeD - 23.09.2016, 03:04
Re: What is the function, stock? - by Gorgeousmaniac - 23.09.2016, 05:33
Re: What is the function, stock? - by SickAttack - 23.09.2016, 07:37
Re: What is the function, stock? - by Gorgeousmaniac - 23.09.2016, 09:09
Re: What is the function, stock? - by Hiddos - 25.11.2016, 02:29
Re: What is the function, stock? - by SickAttack - 25.11.2016, 02:32
Re: What is the function, stock? - by Yashas - 25.11.2016, 04:27
Re: What is the function, stock? - by Threshold - 25.11.2016, 04:49
Re: What is the function, stock? - by SickAttack - 25.11.2016, 04:55
Re: What is the function, stock? - by Threshold - 25.11.2016, 13:17

Forum Jump:


Users browsing this thread: 1 Guest(s)