dini problems. Stats dont save.
#8

I'll give you an example of what Larzi said, Here 'file' is just an empty array.
pawn Код:
dcmd_setskin(playerid, params[])
{
    new id, pskin, pname[MAX_PLAYER_NAME];
    new file[128];//nothing is done with this
    new string[128];
    if(PlayerInfo[playerid][AdminLevel] <2) return SendClientMessage(playerid, color_red, "* You do not have access to execute this command.");
    if(sscanf(params, "ud", id, pskin)) return SendClientMessage(playerid, color_yellow, "* AdmHint: Usage /setskin [id] [skin id]");
        if(!IsPlayerConnected(id)) return SendClientMessage(playerid, color_red, "Hint: Player is not connected.");
    SetPlayerSkin(id, pskin);
    pskin = GetPlayerSkin(id);
    dini_IntSet(file, "PlayerSkin",PlayerInfo[playerid][PlayerSkin] = pskin);
    GetPlayerName(id, pname, MAX_PLAYER_NAME);
    format(string, sizeof(string), "* AdmHint: You changed %s's skin to skinID: %d.", pname, pskin);
    SendClientMessage(playerid, color_yellow, string);
    return 1;
}
But if you look at your second piece of code it has this
pawn Код:
format(file,sizeof(file),"/Users/%s.ini",name);
Making 'file' a destination. Hope this helps.
Reply


Messages In This Thread
dini problems. Stats dont save. - by Kayaque - 13.10.2010, 20:17
Re: dini problems. Stats dont save. - by willsuckformoney - 13.10.2010, 20:23
Re: dini problems. Stats dont save. - by Kayaque - 13.10.2010, 20:29
Re: dini problems. Stats dont save. - by Kayaque - 14.10.2010, 07:33
Re: dini problems. Stats dont save. - by LarzI - 14.10.2010, 08:21
Re: dini problems. Stats dont save. - by Kayaque - 14.10.2010, 08:40
Re: dini problems. Stats dont save. - by Kayaque - 15.10.2010, 07:51
Re: dini problems. Stats dont save. - by iggy1 - 15.10.2010, 08:15
Re: dini problems. Stats dont save. - by Kayaque - 15.10.2010, 09:09
Re: dini problems. Stats dont save. - by Kayaque - 15.10.2010, 14:27

Forum Jump:


Users browsing this thread: 1 Guest(s)