difference between stock ant public
#1

What's the difference between those two? Example?
Reply
#2

stock is mainly used for functions that will not be used, afaik.

public is used for public functions which can be called from other scripts and such with some pre-made functions.
Reply
#3

the advantage of placing (larger) scripts into publics: the Performance Profiler handles publics, but not stocks, so debugging is best done by tending to use publics :P
Reply
#4

Also stock's can return strings and public's cant
Reply
#5

Quote:
Originally Posted by DRIFT_HUNTER
View Post
Also stock's can return strings and public's cant
care to put a wager on that ?
Reply
#6

bet i can return a string from public.... I REALLY wish some of you would thing outside of the box.

a public only requires a 0 / 1 at the end, however, at any point inside of a public, you can return a very long list of variables, stings, ints, floats, blah blah ....

the PASS/FAIL is what is needed at the end.

If I provide an example...whats in it for me... so ****** if your accepting my challenge, then by all means, lets make the wager.
Reply
#7

ooo ive no doubt that a public can 'return' anything ...

I'm simply stating, that ANYONE can 'return' a [string] from a public, so long as the ending allows a pass or fail return ( or at least something OTHER then the string ).

The point in all of this, is that people give out false information ALL the time ( CANT do this/that ) ...when in fact, countless people have been expanding what this community claims are 'CANT BE DONE'

In my experience, ive seen every 'limitation' surpassed .... and the biggest reason why everyone duplicates is because its so rare that people think outside of that limited box.

as for the wager, it matters not what 'rules' are set as to 'how' something gets done, it only matters that the result proves that it CAN be done.
Reply
#8

again .. as I've stated ... you can EASILY 'return' a [string] from any 'public' function ...and since you stated the workarounds, WHY in hell would you tell people that it 'CANT' be done ?

Again..there is no 'Goody' for anyone ... this is about people telling others that something 'CANT' be done, when it simply CAN be done!

PS, this isn't the first time you and I have come to a debate...
2 years ago, we had a debate about surpassing 'checkpoints' and allow a player to have more then one at a give time... of which, I claimed that a player could have unlimited ( least up to 10,000 ) as that was my array limit.... and resulted in telling everyone off showing them a screenshot of 5 checkpoints next to each other...
SADLY .... the result of that 'debate' lead to a forum ban ... which is why most people who CAN build odd ball shit dont participate on these forums.

Now... as i stated ... the ONLY limitations that people on these forums have, are the limitations that you people STATE there are...sadly, people actually BUY into that crap.
Reply
#9

Remember:
"stock" is not necessary if you use the function, pawn can recognizes function using only :

pawn Code:
function(params)
{
   return params;
}
- [S]trong
Reply
#10

Quote:
Originally Posted by [S]trong
View Post
Remember:
"stock" is not necessary if you use the function, pawn can recognizes function using only :

pawn Code:
function(params)
{
   return params;
}
- [S]trong
Go compile that and you will receive errors.

pawn Code:
function(params[])
{
    return params;
}
That would be the way to do it.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)