I need some help
#1

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);
Reply
#2

Код:
new Float:Health, Float:Armour;
            GetPlayerHealth(playerid, Health);
            dini_FloatSet(file, "Health", floatround(Health);
            GetPlayerArmour(playerid, Armour);
            dini_FloatSet(file, "Armour", floatround(Armour);
Reply
#3

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
Reply
#4

Add and extra ')'
Reply
#5

heh .. i'm a retard!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)