SA-MP Forums Archive
cannot save file - 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: cannot save file (/showthread.php?tid=559119)



cannot save file - semara123 - 21.01.2015

hey there help me pls i have problem . when i type the command the dialogbox not open and the file didn't saved here's my code (the file like bannedplayers.txt is already exist)
Код:
CMD:test(playerid,parmas[])
    {
    	new Year, Month, Day;
		getdate(Year, Month, Day);
		printf("%02d/%02d/%d", Day, Month, Year);
		if(fexist(UserBanPath(playerid)))
        {
            INI_ParseFile(UserBanPath(playerid), "LoadBanUser_%s", .bExtra = true, .extra = playerid);
            {
			if(PlayerInfo[playerid][pBanPerm]==1)return SendClientMessage(playerid,-1,"{85BB65}You are Already banned in this date try tomorrow");
			if(Month == 01 && Year == 2015 && Day == 22)
			{
    		new tid,targetn[MAX_PLAYER_NAME];
    		GetPlayerName(tid,targetn,sizeof(targetn));
    		new INI:iFile = INI_Open(UserIPPath(tid));
     		INI_SetTag(iFile,"data");
     		INI_WriteInt(iFile,"BanPerm",1);
     		INI_Close(iFile);
     		new File:logg=fopen("BannedPlayers.txt",io_append);
	 		fwrite(logg, targetn);
	 		fwrite(logg,"\n");
	 		fclose(logg);
			ShowPlayerDialog(playerid, DIALOG_WELCOME, DIALOG_STYLE_MSGBOX, "Notice", "You connected to the server", "Close", "");
			}
		}
	}
return 1;
}
thanks for the help
sorry for my bad english