Default Function Variable? - 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: Default Function Variable? (
/showthread.php?tid=147908)
Default Function Variable? -
Deji - 15.05.2010
According to Pawno, functions aren't allowed to have default values.. wtf?
Code:
public iniGetString(filename[], key[], sectioned = 0, section[]
To me, that's really stupid. Anyone know another way of doing this? I want the last 2 parameters to be excludable when calling the function. If "sectioned" is excluded, then it will default to 0... From there I can configure the code to not use sections when searching for ini file values.
Re: Default Function Variable? -
Deji - 15.05.2010
Ah, ok. What's the difference between public and regular functions, anyway?
Re: Default Function Variable? -
Nero_3D - 15.05.2010
Quote:
Originally Posted by Deji
Ah, ok. What's the difference between public and regular functions, anyway?
|
easy explanation, public is public and every script can use these functions, everything else is only useable for the script, for a better explanation => pawn-lang.pdf/page 83/public
Re: Default Function Variable? -
Deji - 15.05.2010
I can't open PDF files with my current version of Acrobat Reader. And I refuse to use Adobe's new products.
Re: Default Function Variable? -
Kyosaur - 15.05.2010
Quote:
Originally Posted by ♣ Joker ♠
Quote:
Originally Posted by Deji
Ah, ok. What's the difference between public and regular functions, anyway?
|
easy explanation, public is public and every script can use these functions, everything else is only useable for the script, for a better explanation => pawn-lang.pdf/page 83/public
|
Hmmm i wouldnt say that. If i remember correctly, public makes a function and/or a variable visable to the sa-mp server itself, and also compiles a different way, (by name instead of address) hence why functions used by timers have to be public / same for callremotefunction.
erm back on topic, just change the public to stock, and all will be well.