SA-MP Forums Archive
float condition help - 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 condition help (/showthread.php?tid=607291)



float condition help - ratxrat - 17.05.2016

hii all

i'm create progress bar, progressbar value use float type data. i create condition like this

Код:
if (playerdata[playerid][wtf] <= 0.0)
↑not work↑

playerdata[playerid][wtf] ← data for value progressbar. if im use integer progressbar value cannot change.

how to fix condition use float? or any solution?


Re: float condition help - Firewire - 17.05.2016

Have you defined the enum variable as a float type? Your logic in your code may increment in float percentages so that would explain why it does not change when set to an integer.