SA-MP Forums Archive
Dini not saving - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Dini not saving (/showthread.php?tid=327428)



Dini not saving - COD - 21.03.2012

solved


Re: Dini not saving - coole210 - 21.03.2012

I figured out the problem.

pawn Код:
format(file,sizeof(file),PlayerFile,Pinfo[playerid][pName]);
You're formatting the file for playerid, not the giveplayerid, so you have to put it when command executes properly.

pawn Код:
if(sscanf(params, "ud", giveplayerid, level))return SendClientMessage(playerid, COLOR_RED, "Usage: /settrusted [Playerid/Partname] [Level]");
    else if (giveplayerid == INVALID_PLAYER_ID)return SendClientMessage(playerid, COLOR_RED, "The player you're trying to set trusted level is not connected");
    else if (level > 3)return SendClientMessage(playerid, COLOR_RED, "Maximum Trusted Level Is 3");
    else
    {
format(file,sizeof(file),PlayerFile,Pinfo[giveplayerid][pName]);
Pinfo[giveplayerid][Trusted_Level] = level;
        format(string,sizeof(string),"Administrator %s has set you're trusted level to "COL_RED"%d",playername,level);
        SendClientMessage(giveplayerid,-1,string);
        format(string2,sizeof(string2),"%s trusted level has been set to "COL_RED"%d",idname,level);
        SendClientMessageToAll(-1,string2);
        dini_IntSet(file,"Trusted_Level",level);
    }



Re: Dini not saving - Kitten - 21.03.2012

Move on, dini is getting old i recommend using Y_Ini or mysql


Re: Dini not saving - Reklez - 21.03.2012

use y_ini just like Kitten said, dini is slow, dini is my favorite i use it first but then someone recommend me to use y_ini, so i decide to use y_ini. now my favorite is y_ini, i use y_ini for my server. y_ini is one of include packs inside the YSI