[HELP] Accountflies don't be save
#1

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?
Reply
#2

Try if(dini_Exits(accFormat)) instead of if(fexist(accFormat)).
Reply
#3

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

Sorry, try if(dini_Exists(accFormat)).
Reply
#5

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;
}
Reply
#6

Jonni, there are commands downstairs^^

PS: Thank you Iuri! It works now. But please take a loot a THIS Theard.
Reply
#7

Okay.
But anyway you should try that out :P
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)