[HELP] Can't write file (y_ini)
#1

Hello!

I have these testing commands for my server VIP system. These commands will be removed if I put my server online.
The problem with the first command is, that I can't write the timestamp to the users' file. If I type the command, then it says "Unknown command" and nothing else.
The second command is just for testing the variable. /freevip puts my variables right, but doesn't write the files.

Is there something wrong...or doesn't it work that way?
pawn Код:
if(strcmp(cmdtext, "/freevip", true) == 0)
{
        new PlayerFile[256]; PlayerFile = GetPlayerFile(playerid);
        new expire = gettime() + 30*24*60*60;
        Variables[playerid][pVIP] = 1;
        Variables[playerid][pVIPDate] = expire;
        new INI:PFile = INI_Open(PlayerFile);
        INI_WriteInt(PFile,"VIP",1);
        INI_WriteInt(PFile,"VIPDate", expire);
        INI_Close(PFile);
            SendCMDText(playerid,"VIP level 1 activated for 30 days!");
        return 1;
}
if(strcmp(cmdtext, "/vipdate", true) == 0)
{
        new GetVIPDate = Variables[playerid][pVIPDate];
        new string[256];
        format(string,256,"VIP Date: %d",GetVIPDate);
        SendCMDText(playerid,string);
        return 1;
}
Thank You!
Reply


Messages In This Thread
[SOLVED] Can't write file (y_ini) - by martin3644 - 10.03.2016, 16:45
Re: [HELP] Can't write file (y_ini) - by saffierr - 10.03.2016, 22:51
Re: [HELP] Can't write file (y_ini) - by martin3644 - 11.03.2016, 18:08
[No subject] - by Sew_Sumi - 11.03.2016, 19:02

Forum Jump:


Users browsing this thread: 1 Guest(s)