Thread: [Tutorial] Stop the abuse of stock!
View Single Post
Old 13/04/2015, 02:48 AM   #17
Join Date: Dec 2013
Location: GetPlayerPos(playerid, pos); Scripter/Mapper.
Posts: 3,140
Reputation: 445
Default Re: Stop the abuse of stock!

Originally Posted by EiresJason View Post
I find it much easier putting 'stock' in front of a function to find a particular function though.

Like, I want to edit the function (for example)
pawn Code:
SetPlayerLevel(playerid, level) {
But let's say I actually call it 15 times in my script. Pressing CTRL+F and searching for "SetPlayerLevel" may need to me to skip past a good few calls before I get to the actual function, but having..
pawn Code:
stock SetPlayerLevel(playerid, level) {
lets me just search for "k SetPlayerLevel" and I'm at it right away.

If that makes sense xD
This isn't a good enough reason to use stock, you can even simply do something such as this:
pawn Code:
#define SetPlayerLevelEx FUNC_SetPlayerLevel

pawn Code:
FUNC_SetPlayerLevel(playerid, level) {
   // .. code

Then you can just search for "FUNC_Functionname", - calling the function throughout the script as "SetPlayerLevelEx".

If it gets on your nerves so much try this or another method, but as I said this is NOT A GOOD REASON TO USE STOCK!
Abagail is offline   Reply With Quote