Armour is always saved as 1
#1

I added this to the save command:

Код:
new Float:armours;

dini_IntSet(file,"Armour",GetPlayerArmour(playerid,armours));
But for some reason the armour is always saved as 1.

It looks like this in the .ini file:
Код:
Armour=1
Does anyone know whats wrong?
Reply
#2

for float you need dini_FloatSet not dini_IntSet

this will work
Quote:

new Float:armours;

dini_FloatSet(file,"Armour",GetPlayerArmour(player id,armours));

Reply
#3

@dud: Yes, but the function has to be outside the dini_FloatSet

pawn Код:
new Float:armours;
GetPlayerArmour(playerid,armours)
dini_FloatSet(file,"Armour",armours);
Cheers.
Reply
#4

Well , You can set it as integer.

pawn Код:
new Float:HP;
GetPlayerHealth(playerid,HP);
new round = floatround(HP);
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)