[HELP] Accountflies don't be save -
]B4E[kengston - 29.12.2010
When i logout and look into my Dini, the Score and my other things aren't saved.
Here is my Code.
Код:
public OnPlayerDisconnect(playerid, reason)
{
new pname[MAX_PLAYERS],accFormat[128];
GetPlayerName(playerid,pname,sizeof pname);
format(accFormat,sizeof accFormat,"/Players/%s.datei",pname);
if(fexist(accFormat) && Spieler[playerid][eingeloggt])
{
dini_IntSet(accFormat,"skin",Spieler[playerid][skin]);
dini_IntSet(accFormat,"Score",GetPlayerScore(playerid));
dini_IntSet(accFormat, "AdminLevel", Spieler[playerid][AdminLevel]);
dini_IntSet(accFormat,"Mute",Spieler[playerid][Mute]);
dini_IntSet(accFormat,"gebannte",Spieler[playerid][gebannte]);
dini_IntSet(accFormat,"gekickte",Spieler[playerid][gekickte]);
dini_IntSet(accFormat,"vip",Spieler[playerid][vip]);
}
Can you help me, please?
Re: [HELP] Accountflies don't be save -
Iuri - 29.12.2010
Try
if(dini_Exits(accFormat)) instead of
if(fexist(accFormat)).
Re: [HELP] Accountflies don't be save -
]B4E[kengston - 29.12.2010
C:\Dokumente und Einstellungen\Besitzer\Desktop\0.3c Rc7 Server\gamemodes\BJ.pwn(4801) : error 017: undefined symbol "dini_Exits"
C:\Dokumente und Einstellungen\Besitzer\Desktop\0.3c Rc7 Server\gamemodes\BJ.pwn(4801) : error 029: invalid expression, assumed zero
C:\Dokumente und Einstellungen\Besitzer\Desktop\0.3c Rc7 Server\gamemodes\BJ.pwn(4801) : warning 215: expression has no effect
C:\Dokumente und Einstellungen\Besitzer\Desktop\0.3c Rc7 Server\gamemodes\BJ.pwn(4801) : error 001: expected token: ";", but found ")"
C:\Dokumente und Einstellungen\Besitzer\Desktop\0.3c Rc7 Server\gamemodes\BJ.pwn(4801) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
Re: [HELP] Accountflies don't be save -
Iuri - 29.12.2010
Sorry, try
if(dini_Exists(accFormat)).
AW: [HELP] Accountflies don't be save -
Jonni8 - 29.12.2010
At first: you forgot the return and the clsoing bracket...
Then try this:
pawn Код:
public OnPlayerDisconnect(playerid, reason)
{
new pname[MAX_PLAYERS],accFormat[128];
GetPlayerName(playerid,pname,sizeof pname);
format(accFormat,sizeof accFormat,"/Players/%s.datei",pname);
if(fexist(accFormat) && Spieler[playerid][eingeloggt] == true) // or == 1
{
dini_IntSet(accFormat,"skin",Spieler[playerid][skin]);
dini_IntSet(accFormat,"Score",GetPlayerScore(playerid));
dini_IntSet(accFormat, "AdminLevel", Spieler[playerid][AdminLevel]);
dini_IntSet(accFormat,"Mute",Spieler[playerid][Mute]);
dini_IntSet(accFormat,"gebannte",Spieler[playerid][gebannte]);
dini_IntSet(accFormat,"gekickte",Spieler[playerid][gekickte]);
dini_IntSet(accFormat,"vip",Spieler[playerid][vip]);
}
return 1;
}
Re: [HELP] Accountflies don't be save -
]B4E[kengston - 29.12.2010
Jonni, there are commands downstairs^^
PS: Thank you Iuri! It works now. But please take a loot a
THIS Theard.
AW: [HELP] Accountflies don't be save -
Jonni8 - 29.12.2010
Okay.
But anyway you should try that out :P