djson problem.
#1

pawn Код:
forward OnPlayerRegister(playerid, password[]);
public OnPlayerRegister(playerid, password[])
{
    if(IsPlayerConnected(playerid))
    {
      new string[128];
      format(string, sizeof(string), "users/%s.json", PlayerName(playerid));
        if(!djIsSet(string, "Key"))
        {
          djCreateFile(string);
          djSet(string,"Key",password);
          djSetInt(string, "Cash", PlayerInfo[playerid][pCash]);
          djSetInt(string, "Account", PlayerInfo[playerid][pAccount]);
          djSetInt(string, "AdminLevel", PlayerInfo[playerid][pAdmin]);
          djSetInt(string, "Level", PlayerInfo[playerid][pLevel]);
          djSetInt(string, "Experience", PlayerInfo[playerid][pExp]);
          djSetInt(string, "Kills", PlayerInfo[playerid][pKills]);
          djSetInt(string, "Gun1", PlayerInfo[playerid][pGun1]);
          djSetInt(string, "Gun2", PlayerInfo[playerid][pGun2]);
          djSetInt(string, "Gun3", PlayerInfo[playerid][pGun3]);
          djSetInt(string, "Gun4", PlayerInfo[playerid][pGun4]);
          djSetInt(string, "Gun5", PlayerInfo[playerid][pGun5]);
          and so on....
The script compiles right.. but when i register and open the file i just find:
Код:
{ }
:S
Reply
#2

Now all under: djson_GameModeInit(); wont load. Any ideas ?

i putted it under ongamemodeinit at first position
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)