Float Issues. - 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: Float Issues. (
/showthread.php?tid=575690)
Float Issues. -
Prokill911 - 29.05.2015
Fixed.
Thanks to below help.
Re: Float Issues. -
Vince - 29.05.2015
pawn Код:
new Float:armour = GetPlayerArmour(playerid, armour);
Doesn't that seem redundant? GetPlayerAmour (and by extension GetPlayerHealth) itself only returns 1 or 0 depending on whether the player is connected. The actual armour value is stored in the variable that is passed by reference (that is: the variable between the brackets).
I just tested this statement and I find it rather odd that it does not give a tag mismatch warning, even though it probably should.
Re: Float Issues. -
Prokill911 - 29.05.2015
Quote:
Originally Posted by Vince
pawn Код:
new Float:armour = GetPlayerArmour(playerid, armour);
Doesn't that seem redundant? GetPlayerAmour (and by extension GetPlayerHealth) itself only returns 1 or 0 depending on whether the player is connected. The actual armour value is stored in the variable that is passed by reference (that is: the variable between the brackets).
I just tested this statement and I find it rather odd that it does not give a tag mismatch warning, even though it probably should.
|
I don't get what you mean...
If I was not using:
pawn Код:
new Float:armour = GetPlayerArmour(playerid, armour);
Only difference that would be done is
pawn Код:
new Float:armour;
GetPlayerArmour(playerid, armour);
Re: Float Issues. -
rappy93 - 29.05.2015
This is the correct way :
PHP код:
new Float:armour;
GetPlayerArmour(playerid, armour);
Re: Float Issues. -
Prokill911 - 29.05.2015
Quote:
Originally Posted by rappy93
This is the correct way :
PHP код:
new Float:armour;
GetPlayerArmour(playerid, armour);
|
I feel like an idiot -.-
The rest of it was perfect an that one little bit fuxed me over -.- Q_Q