y_ini
#1

Hi, I'm making a gamemode right now that uses y_ini saving system, I created another folder called "Bans" to save the banned IPs, it all works except when I add this:
Код:
	new path[32], ip[16], username[MAX_PLAYER_NAME], bannedby[MAX_PLAYER_NAME], banreason[32], bandate[24];
	
	GetPlayerIp(playerid, ip, sizeof(ip));
	
	format(path, sizeof(path), "/Bans/%s.ini", ip);
	
	if (fexist(path))
	{
		new INI:File = INI_Open(path), string[248];
		
		INI_String("Username", username, 24);
		INI_String("BannedBy", bannedby, 24);
		INI_String("BanReason", banreason, 32);
		INI_String("BanDate", bandate, 24);
		
		format(string, sizeof(string), "Your IP (%s) is banned.\n\nUsername: %s\nBanned By: %s\nReason: %s \nDate: %s", ip, username, bannedby, banreason, bandate);
		ShowPlayerDialog(playerid, DIALOG_BANNED, DIALOG_STYLE_MSGBOX, "Banned", string, "Close", "");
		KickEx(playerid);
	}
under OnPlayerConnect I get these errors:
Код:
C:\Users\dell\Desktop\Team Deathmatch\gamemodes\TDM.pwn(385) : error 017: undefined symbol "name"
C:\Users\dell\Desktop\Team Deathmatch\gamemodes\TDM.pwn(385) : error 017: undefined symbol "value"
C:\Users\dell\Desktop\Team Deathmatch\gamemodes\TDM.pwn(386) : error 017: undefined symbol "name"
C:\Users\dell\Desktop\Team Deathmatch\gamemodes\TDM.pwn(386) : error 017: undefined symbol "value"
C:\Users\dell\Desktop\Team Deathmatch\gamemodes\TDM.pwn(387) : error 017: undefined symbol "name"
C:\Users\dell\Desktop\Team Deathmatch\gamemodes\TDM.pwn(387) : error 017: undefined symbol "value"
C:\Users\dell\Desktop\Team Deathmatch\gamemodes\TDM.pwn(388) : error 017: undefined symbol "name"
C:\Users\dell\Desktop\Team Deathmatch\gamemodes\TDM.pwn(388) : error 017: undefined symbol "value"
C:\Users\dell\Desktop\Team Deathmatch\gamemodes\TDM.pwn(383) : warning 204: symbol is assigned a value that is never used: "File"
I'm kinda new to y_ini. What am I doing wrong here? Do I need to do something with INI_ParseFile?
Reply


Messages In This Thread
y_ini - by GoldenLion - 10.09.2016, 17:21
Re: y_ini - by Gotham - 10.09.2016, 17:25
Re: y_ini - by Stinged - 10.09.2016, 18:16
Re: y_ini - by GoldenLion - 10.09.2016, 18:27

Forum Jump:


Users browsing this thread: 1 Guest(s)