Hello guys, pleases i need help with add Country to connect message.
Code:
public Action:ev_PlayerConnect(Handle:event, const String:name[], bool:dontBroadcast)
{
if (GetConVarBool(cvarBlockConnectMessage))
{
if (!dontBroadcast)
{
new iUserId = GetEventInt(event, "userid");
new iClient = GetClientOfUserId(iUserId);
new String:String:IP[99], String:Country[99]; // this is line 124
if(!GeoipCountry(IP, Country, sizeof Country))
{
Country = "Unknown Country";
}
decl String:strNetworkId[50];
GetEventString(event, "networkid", strNetworkId, sizeof(strNetworkId));
decl String:strAddress[50];
GetEventString(event, "address", strAddress, sizeof(strAddress));
if (iClient != 0)
{
if (GetConVarInt(cvarAdminShowMessages) == 1)
{
for (new i = 1; i <= MaxClients; i++)
{
if (IsClientConnected(i) && IsClientInGame(i) && GetUserAdmin(i) != INVALID_ADMIN_ID)
{
PrintToChat(i,"%N has connected. (%s)", iClient, Country);
}
}
}
}
SetEventBroadcast(event, true);
}
}
return Plugin_Continue;
}
Error:
Code:
plugin.sp(124) : warning 217: loose indentation
plugin.sp(124) : error 001: expected token: "-identifier-", but found "-label-"
plugin.sp(124) : error 017: undefined symbol "IP"
plugin.sp(124) : warning 215: expression has no effect
plugin.sp(124) : error 001: expected token: ";", but found "]"
plugin.sp(124) : fatal error 190: too many error messages on one line