10.09.2016, 17:21
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:
under OnPlayerConnect I get these errors:
I'm kinda new to y_ini. What am I doing wrong here? Do I need to do something with INI_ParseFile?
Код:
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); }
Код:
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"