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"
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)) //Check if the IP is in the bans folder { 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); }
INI_String is just a macro that works in callbacks that are called by parsing a file.
You have to parse your file to read stuff from it. |