Dini not saving
#1

solved
Reply
#2

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

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

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)