#1

So, I got everything sorted out
When I log off, Everything is saved FINE in the scriptfiles, but when I login next time, no money or anything is loaded..

What should I add where?
Reply
#2

Post your load account code so we can see? Have you checked the server logs?
Reply
#3

OnPlayerDisconnect?
Must be saved all the data.
Reply
#4

pawn Код:
forward LoadUser_data(playerid,name[],value[]);
public LoadUser_data(playerid,name[],value[])
{
    INI_Int("Password",PlayerInfo[playerid][pPass]);
    INI_Int("Score",PlayerInfo[playerid][pScore]);
    INI_Int("Cash",PlayerInfo[playerid][pCash]);
    INI_Int("Kills",PlayerInfo[playerid][pKills]);
    INI_Int("Deaths",PlayerInfo[playerid][pDeaths]);
    INI_Int("AdminLevel",PlayerInfo[playerid][pAdminLevel]);
    return 1;
}
stock UserPath(playerid)
{
    new string[128],playername[MAX_PLAYER_NAME];
    GetPlayerName(playerid,playername,sizeof(playername));
    format(string,sizeof(string),PATH,playername);
    return string;
}

stock udb_hash(buf[]) {
    new length=strlen(buf);
    new s1 = 1;
    new s2 = 0;
    new n;
    for (n=0; n<length; n++)
    {
       s1 = (s1 + buf[n]) % 65521;
       s2 = (s2 + s1)     % 65521;
    }
    return (s2 << 16) + s1;
}
There is no loadaccount_user in my script..
Reply
#5

I did this
pawn Код:
forward loadaccount_user(playerid, name[], value[]);
public loadaccount_user(playerid, name[], value[])
{
    INI_String("Password", pInfo[playerid][pPass],129);   //Line 393
    INI_Int("Score",pInfo[playerid][pScore]);
    INI_Int("Cash",pInfo[playerid][pCash]);
    INI_Int("Score",pInfo[playerid][pScore]);
    INI_Int("Kills",pInfo[playerid][pKills]);
    INI_Int("Deaths",pInfo[playerid][pDeaths]);
    INI_Int("AdminLevel",pInfo[playerid][pAdminlevel]);
    return 1;
}
code:
Код:
D:\SAMP\Server\SACCNR [0.3e R2]\gamemodes\SACCNR.pwn(393) : error 028: invalid subscript (not an array or too many subscripts): "pInfo"
D:\SAMP\Server\SACCNR [0.3e R2]\gamemodes\SACCNR.pwn(393) : error 029: invalid expression, assumed zero
D:\SAMP\Server\SACCNR [0.3e R2]\gamemodes\SACCNR.pwn(393) : error 029: invalid expression, assumed zero
D:\SAMP\Server\SACCNR [0.3e R2]\gamemodes\SACCNR.pwn(393) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Any help?
Reply
#6

Well, you should give it to the player after you loaded it...
For example:
pawn Код:
SetPlayerScore(playerid,PlayerInfo[playerid][pScore]);
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)