floats
#11

i assume you want to it like this:
FactoryInfo[GetPVarInt(playerid, "InFactory")][fStock] -= 1.00;
equals
FactoryInfo[1][fStock] -= 1.00;// nothing wrong with the PVar. it needs to be an Integer (to call an array indeed)
equals
FactoryInfo[1][1] -= 1.00;//assuming any value 1 for fStock would do fine...
that makes me to ask you if you initialized it as a float? coz you store a float inside...
Код:
new Float:FactoryInfo[][];
if you print out an integer as a float, such huge values like 137853251231.00 are normal.
i suggest you to store the values as a float and later then you can print them out by using
Код:
format(string,sizeof(string),"%f",FactoryInfo[1][1]);//1 and 1 made it simpler to read
as you told us. is there any difference to the way you tried? or did i run into the same problem yet?
Reply


Messages In This Thread
SOLVED[Floats] - by armyoftwo - 09.10.2010, 09:48
Re: floats - by hencz - 09.10.2010, 09:54
Re: floats - by armyoftwo - 09.10.2010, 09:56
Re: floats - by Mean - 09.10.2010, 10:25
Re: floats - by armyoftwo - 09.10.2010, 11:35
Re: floats - by legodude - 09.10.2010, 11:58
Re: floats - by Voldemort - 09.10.2010, 12:48
Re: floats - by Babul - 09.10.2010, 13:01
Re: floats - by armyoftwo - 09.10.2010, 13:09
Re: floats - by armyoftwo - 09.10.2010, 13:16
Re: floats - by Babul - 09.10.2010, 13:37
Re: floats - by armyoftwo - 09.10.2010, 14:09

Forum Jump:


Users browsing this thread: 1 Guest(s)