Stock
#6

stock means that if that function is not used in your script, it will not be added to the .amx while compiling.
So if you have this:
Код:
//In OnPlayerCommandText
if(!strcmp(cmdtext, "/mycommand", true) {
    Func1();
    Func2();
    return 1;
}

//Somewhere in your script
Func1() {
    //Do something
}

stock Func2() {
    //Do something
}

stock Func3() {
    //Do something
}

Func4() {
    //Do something
}
  • Func1 will be included in the .amx file, because it is not stock and is used in the command.
  • Func2 will be included in the .amx file, because it is stock and used in the command.
  • Func3 will be NOT included in the .amx file, because it is stock and not used.
  • Func4 will give a compile warning that it is not used.
So if you don't use a function, but don't want to delete it, declare it stock.
Reply


Messages In This Thread
Stock - by Micko123 - 14.07.2016, 12:07
Re: Stock - by Micko123 - 14.07.2016, 12:18
Re: Stock - by Dayrion - 14.07.2016, 12:19
Re: Stock - by GangstaaSunny - 14.07.2016, 12:19
Re: Stock - by Micko123 - 14.07.2016, 12:22
Re: Stock - by Freaksken - 14.07.2016, 12:22
Re: Stock - by Flake. - 14.07.2016, 12:23
Re: Stock - by Micko123 - 14.07.2016, 12:29
Re: Stock - by Freaksken - 14.07.2016, 12:32
Re: Stock - by Freaksken - 14.07.2016, 12:42

Forum Jump:


Users browsing this thread: 1 Guest(s)