SA-MP Forums Archive
dini going crazy? - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: dini going crazy? (/showthread.php?tid=182433)



dini going crazy? - Rocky Balboa - 10.10.2010

hmm i was trying to make a saving system .. and i dont want to use dudb ... i want to use dini ..
now the code is
pawn Код:
stock Stats(playerid)
{
    new thefile[256];
    new Float:thealth;  GetPlayerHealth(playerid, Float:thealth);
    format(thefile,sizeof(thefile),"/players/%s.sav",pName(playerid));
    dini_Set(thefile,"Health",floatround(thealth));//line 58
}
Everything is ok .. but i get these error

pawn Код:
.pwn(58) : error 035: argument type mismatch (argument 3)
Why is that ? I could not fix it ... anyone could help me ?


Re: dini going crazy? - jameskmonger - 10.10.2010

Which line is line 58?


Re: dini going crazy? - Mike Garber - 10.10.2010

pawn Код:
new Float:thealth = GetPlayerHealth(playerid); // Line 56 (?)
Try that..


Re: dini going crazy? - Rocky Balboa - 10.10.2010

Nop, it didnt work ..
and line 58 is this
dini_Set(thefile,"Health",floatround(thealth));//line 58


Re: dini going crazy? - Mike Garber - 10.10.2010

You know It's not always that exact line the error Is showing that is wrong..
If you defined the variable wrong above but in the right format It will show an error where you use It.

Try this;

pawn Код:
stock Stats(playerid)
{
    new thefile[256];
    new Float:thealth;
    GetPlayerHealth(playerid, thealth);
    format(thefile,sizeof(thefile),"/players/%s.sav",pName(playerid));
    dini_Set(thefile,"Health",thealth);//line 58
}



Re: dini going crazy? - Rocky Balboa - 10.10.2010

From dini_set to dini_IntSet ... thats what i did and it showed no errors