stock, public or nothing? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: stock, public or nothing? (
/showthread.php?tid=157689)
stock, public or nothing? -
Miikkel - 07.07.2010
I've searched around wiki.samp to find the answer, but I can't realy seem to find it.
I want to know when I should use stock, public or nothing like ...
pawn Код:
forward Example1();
forward Example2();
forward Example3();
stock Example1()
{
}
public Example2()
{
}
Example3()
{
}
Thank you ...
Re: stock, public or nothing? -
Mystique - 07.07.2010
I actually think that public is the only one you need to forward. You can make stock and the nothing without forwarding it.
Re: stock, public or nothing? -
dice7 - 07.07.2010
https://sampwiki.blast.hk/wiki/Keywords:Initialisers
Re: stock, public or nothing? -
Calgon - 07.07.2010
stock - Great for use if you're unsure that you'll even use it.
no prefix/initialiser - Great for use if you don't need to forward it.
public - Great for use if you need to use this externally, or for a timer.
Re: stock, public or nothing? -
Miikkel - 07.07.2010
Quote:
Originally Posted by Calgon
stock - Great for use if you're unsure that you'll even use it.
no prefix/initialiser - Great for use if you don't need to forward it.
public - Great for use if you need to use this externally, or for a timer.
|
At stock - Why create things that you don't use in your gamemode? Wouldn't that increase the CPU usage?
Re: stock, public or nothing? -
MadeMan - 07.07.2010
That's the use of stock, if you don't use it, the compiler ignores it.
Re: stock, public or nothing? -
Miikkel - 07.07.2010
Quote:
Originally Posted by MadeMan
That's the use of stock, if you don't use it, the compiler ignores it.
|
I see. Thanks to everyone for helping me