![]() |
#11 | |
High-roller
![]() ![]() ![]() ![]() ![]() Join Date: Jun 2010
Posts: 2,378
Reputation: 569
|
![]() Quote:
pawn Code:
So basically, you're not required to use "stock", you could leave it naked or the other ways of using "static" keyword if it's used locally/internally. |
|
![]() |
![]() |
![]() |
#12 | ||
High-roller
![]() ![]() ![]() ![]() ![]() Join Date: Dec 2010
Location: Belgium
Posts: 1,770
Reputation: 1001
|
![]() Quote:
Quote:
And yes Vince, i did read. But too fast. |
||
![]() |
![]() |
![]() |
#13 |
Big Clucker
![]() ![]() Join Date: Oct 2009
Location: Belgium
Posts: 81
Reputation: 82
|
![]()
I always wondered why people would put stock before every function. I would think most scripters know what they're doing, or perhaps "because it looks pretty with a keyword" (the stock keyword is ugly imho).
Just write functions and if you don't use one, the compiler will kindly remember you and then refactor your code instead of filling it with stock modifiers. |
![]() |
![]() |
![]() |
#14 |
Gangsta
![]() ![]() ![]() ![]() Join Date: Mar 2013
Location: Dublin.
Posts: 685
Reputation: 76
|
![]()
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:
pawn Code:
If that makes sense xD |
![]() |
![]() |
![]() |
#15 |
Banned
![]() Join Date: Jan 2012
Location: Dallas, Texas
Posts: 1,509
Reputation: 226
|
![]()
I thought stock is faster as well, more optimized, it's not?
|
![]() |
![]() |
![]() |
#16 |
High-roller
![]() ![]() ![]() ![]() ![]() Join Date: Jan 2015
Location: Canada
Posts: 1,766
Reputation: 840
|
![]() |
![]() |
![]() |
![]() |
#17 | |
High-roller
![]() ![]() ![]() ![]() ![]() Join Date: Dec 2013
Location: GetPlayerPos(playerid, pos); Scripter/Mapper.
Posts: 3,140
Reputation: 445
|
![]() Quote:
pawn Code:
pawn 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! |
|
![]() |
![]() |
![]() |
#18 | |
Gangsta
![]() ![]() ![]() ![]() Join Date: Mar 2013
Location: Dublin.
Posts: 685
Reputation: 76
|
![]() Quote:
Thanks for the suggestion but it doesn't seem reasonable to do that for every single function I use ![]() EDIT: So yeah.. it literally makes no difference? XD Last edited by EiresJason; 14/04/2015 at 01:55 AM. |
|
![]() |
![]() |
![]() |
#19 | |
High-roller
![]() ![]() ![]() ![]() ![]() Join Date: Jun 2012
Posts: 4,852
Reputation: 1313
|
![]() Quote:
Ex. Function Test(); |
|
![]() |
![]() |
![]() |
#20 |
High-roller
![]() ![]() ![]() ![]() ![]() Join Date: Dec 2013
Location: GetPlayerPos(playerid, pos); Scripter/Mapper.
Posts: 3,140
Reputation: 445
|
![]()
What do you mean by #define function? What I am saying is he should look into internally using a function name for the actual function, while within the .pwn file using another one for within the script(calling the function), however in compilation, everything will be the same.
|
![]() |
![]() |
![]() |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
G abuse | Cerealguy | Scripting Help | 3 | 12/01/2015 03:40 PM |
Repair Abuse | MBilal | Scripting Help | 12 | 30/09/2013 04:03 PM |
Pickup abuse.. | ThePhill97 | Scripting Help | 1 | 23/11/2012 07:14 PM |
How to make stock stop a script? | ddnbb | Scripting Help | 12 | 27/08/2012 02:29 PM |
[AJUDA] Stock stock GetVehicleModelID(nome[]) | Baigou | Português/Portuguese | 1 | 09/11/2011 12:21 AM |