I need some help - 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: I need some help (
/showthread.php?tid=193644)
I need some help -
Buzzbomb - 26.11.2010
Is this right if not whats the right way it compile fine but doesnt save the armour and health damage
I can save player health too 100 and everytime they relog they have 100 i want it to save there armour and health if they recieved damage to there armour or health it would save there health and armour so when they relog in it be where they logged out
My Varibles are pHealth, pArmour,
under enum is
new PlayerInfo[MAX_PLAYERS][pInfo];
And this is the location i retrieve player userfiles
new file[24];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(file, sizeof(file), ARS_SERVERFILES, name);
Код:
new Float:Health, Float:Armour;
GetPlayerHealth(playerid, Health);
dini_FloatSet(file, "Health", Health);
GetPlayerArmour(playerid, Armour);
dini_FloatSet(file, "Armour", Armour);
Re: I need some help -
blackwave - 27.11.2010
Код:
new Float:Health, Float:Armour;
GetPlayerHealth(playerid, Health);
dini_FloatSet(file, "Health", floatround(Health);
GetPlayerArmour(playerid, Armour);
dini_FloatSet(file, "Armour", floatround(Armour);
Re: I need some help -
Buzzbomb - 27.11.2010
Quote:
Originally Posted by blackwave
Код:
new Float:Health, Float:Armour;
GetPlayerHealth(playerid, Health);
dini_FloatSet(file, "Health", floatround(Health);
GetPlayerArmour(playerid, Armour);
dini_FloatSet(file, "Armour", floatround(Armour);
|
It would of been nice if that worked but i get the following errors
Код:
ARS0~1.2\GAMEMO~1\ARS.pwn(665) : error 001: expected token: ",", but found ";"
ARS0~1.2\GAMEMO~1\ARS.pwn(667) : error 001: expected token: ",", but found ";"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
2 Errors.
Код:
new Float:Health, Float:Armour;
GetPlayerHealth(playerid, Health);
dini_FloatSet(file, "Health", floatround(Health); // line 665
GetPlayerArmour(playerid, Armour);
dini_FloatSet(file, "Armour", floatround(Armour);// line 667
Re: I need some help - [L3th4l] - 27.11.2010
Add and extra ')'
Re: I need some help -
Buzzbomb - 27.11.2010
heh .. i'm a retard!