Y_ini error
#1

Ok so im trying to make an offline jailing system this is my code.

PHP код:
CMD:ojail(playeridparams[])
{
    if(
IsPlayerAdmin(playerid) || pInfo[playerid][Admin] >= 4)
    {
        new 
playerb[32], string[128], file[32], time[6];
          if(
sscanf(params"s[32]i[6]s[128]"playerbtimeparams)) return SendClientMessage(playeriderror"Usage: /ojail [playername] [time] [reason]");
        if(
idCheck(playerb) != INVALID_PLAYER_ID) return SendClientMessage(playeriderror"Player is connected to the server, use /ajail instead.");
        if (!
fexist(file)) return SendClientMessage(playerid,error,"Error: This player doesn't have an account.");
        new 
INI:ACCOUNT INI_Open(file);
        
INI_SetTag(ACCOUNT,"data");
        
INI_WriteInt(ACCOUNT"Jailed"2);
        
INI_WriteInt(ACCOUNT"JailedTime"time);
        
INI_Close(ACCOUNT);
        
format(stringsizeof(string), "[AdmCmd]: {FF6347}An Administrator has been jailed %s. [Reason: %s]"playerbparams);
        
SendClientMessageToAll(redstring);
        
format(stringsizeof(string), "[OJAIL] %s has offline jailed %s . [Reason: %s]"GetName(playerid), playerbparams);
        
WriteToLog(string,"oJail");
    }
    else return 
ShowMessage(playeriderror1);
      return 
1;
}
//But i keep getting an argument type mismatch at this line
INI_WriteInt(ACCOUNT"JailedTime"time); 
Also could someone tell me how to read from a specific line in y_ini. Example say i want to show the players reason why he was banned on his next connection to the server , how do i read from the file..

Dont send me the link to the Y_ini topic cause i tried it already and failed... So could someone explain it and show me as well.
Reply


Messages In This Thread
Y_ini error - by 1fret - 17.04.2017, 23:29
Re: Y_ini error - by Nyitz - 17.04.2017, 23:50
Re: Y_ini error - by CaRaM3LL - 17.04.2017, 23:51
Re: Y_ini error - by 1fret - 18.04.2017, 01:02
Re: Y_ini error - by StrikerZ - 18.04.2017, 01:10
Re: Y_ini error - by CaRaM3LL - 18.04.2017, 01:18
Re: Y_ini error - by 1fret - 18.04.2017, 01:21
Re: Y_ini error - by StrikerZ - 18.04.2017, 01:25

Forum Jump:


Users browsing this thread: 3 Guest(s)