stock, public or nothing?
#1

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

I actually think that public is the only one you need to forward. You can make stock and the nothing without forwarding it.
Reply
#3

https://sampwiki.blast.hk/wiki/Keywords:Initialisers
Reply
#4

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

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?
Reply
#6

That's the use of stock, if you don't use it, the compiler ignores it.
Reply
#7

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)