#1

hello,
i've got a saving system, but now i want to save my health.
ive got this but i get a target mismatch on this line:
Код:
dini_IntSet(udb_encode(playername), "health", health);
on top if my script i have:
Код:
new Float: health;
and in onplayerdisconnect i have this:
Код:
health = GetPlayerHealth(playerid, health);
together with the error line i gave you.

in my onplayercommandtext on /register i have:
Код:
health = GetPlayerHealth(playerid, health);
and
Код:
dini_IntSet(udb_encode(playername), "health", 100);
and those DO work, but the other one doesn't .... how can i fix this
Reply
#2

try
Код:
dini_IntSet(udb_encode(playername), "health", strval(health));
see if that works.
Reply
#3

Health is not a string therefor strval wont work. You need to use floatstr.

pawn Код:
dini_IntSet(udb_encode(playername), "health", floatstr(health));
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)