SA-MP Forums Archive
Help with y-ini - 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)
+--- Thread: Help with y-ini (/showthread.php?tid=553548)



Help with y-ini - Stoyanov - 30.12.2014

warning 202:number of arguments does not match definition
warning 202:number of arguments does not match definition
Код:
INI_WriteFloat(File, "Health", GetPlayerHealth(playerid));
INI_WriteFloat(File, "Armour", GetPlayerArmour(playerid));
tag mismatch
tag mismatch

Код:
INI_Float("Health", PlayerInfo[playerid][pHealth]);
INI_Float("Armour", PlayerInfo[playerid][pArmour]);



Re: Help with y-ini - TonyII - 30.12.2014

Should be like this GetPlayerHealth(playerid,health); or GetPlayerArmour(playerid,armor);

https://sampwiki.blast.hk/wiki/GetPlayerHealth


Re: Help with y-ini - Stoyanov - 30.12.2014

totally forgot.

Thanks.

But, tag mismatch ?


Re: Help with y-ini - UltraScripter - 30.12.2014

new Float:Health;
INI_WriteInt(File, "Health", GetPlayerHEalth(playerid, Health));


Re: Help with y-ini - TonyII - 30.12.2014

Make sure that it's Float: pHealth, Float: pArmour, under your enum


Re: Help with y-ini - Facerafter - 30.12.2014

Quote:
Originally Posted by Stoyanov
Посмотреть сообщение
warning 202:number of arguments does not match definition
warning 202:number of arguments does not match definition
Код:
INI_WriteFloat(File, "Health", GetPlayerHealth(playerid));
INI_WriteFloat(File, "Armour", GetPlayerArmour(playerid));
tag mismatch
tag mismatch

Код:
INI_Float("Health", PlayerInfo[playerid][pHealth]);
INI_Float("Armour", PlayerInfo[playerid][pArmour]);
Quote:

INI_WriteFloat
INI:file - File to write to.
name[] - Data name.
Float:data - Float data.
accuracy - number of decimal places to write.

You forgot the amount of decimals, 2 should be enough for health/armor.


Re: Help with y-ini - Stoyanov - 30.12.2014

Quote:
Originally Posted by TonyII
Посмотреть сообщение
Make sure that it's Float: pHealth, Float: pArmour, under your enum
Yep. Thanks again


Re: Help with y-ini - Stoyanov - 30.12.2014

Quote:
Originally Posted by Facerafter
Посмотреть сообщение
You forgot the amount of decimals, 2 should be enough for health/armor.



Dude.. writing a float as a integer?
Was integer, i already made it Float.


Re: Help with y-ini - UltraScripter - 30.12.2014

do like this

pawn Код:
INI_WriteInt(File, "Health" GetPlayerHealth(playerid, pHealth));



Re: Help with y-ini - Facerafter - 30.12.2014

Quote:
Originally Posted by Stoyanov
Посмотреть сообщение
Was integer, i already made it Float.
No that last part was not meant for you.
But you are missing a parameter at INI_Writefloat