09.10.2010, 13:37
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...
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
as you told us. is there any difference to the way you tried? or did i run into the same problem yet?
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[][];
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