Out of curiosity - 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)
+--- Thread: Out of curiosity (
/showthread.php?tid=350015)
Out of curiosity -
Tee - 10.06.2012
Out of curiosity I'm asking what the "&" in a function does.
Example:
pawn Code:
gettime(&hour, &minute, &second);
Re: Out of curiosity -
Revo - 10.06.2012
To my knowledge (And I'm not certain about it) It indicates its a float.
Re: Out of curiosity -
milanosie - 10.06.2012
Quote:
Originally Posted by Tee
Out of curiosity I'm asking what the "&" in a function does.
Example:
pawn Code:
gettime(&hour, &minute, &second);
|
don't think it does anything?
I think you mean the % function right?
Re: Out of curiosity -
Tee - 10.06.2012
Quote:
Originally Posted by BuuGhost
To my knowledge (And I'm not certain about it) It indicates its a float.
|
It's not a float.
Quote:
Originally Posted by milanosie
don't think it does anything?
I think you mean the % function right?
|
No, I mean "&".
Re: Out of curiosity -
Joe Staff - 10.06.2012
That means that the variable is read and write, where other wise the variable is read only (within the function).
you would use that instead of return if you have multiple returns.
Re: Out of curiosity -
Tee - 10.06.2012
May I have an example?
Re: Out of curiosity -
JaTochNietDan - 10.06.2012
Quote:
Originally Posted by Tee
No, I mean "&".
|
It is explained in this tutorial with an example:
https://sampforum.blast.hk/showthread.php?tid=321465
Please try searching in the future.
Re: Out of curiosity -
Tee - 10.06.2012
I did try but didn't really know the right keywords, thanks.