array must be indexed (variable "playerip")
#1

Hey, i was trying to do so if the server get's my ip it would say ADMIN: %s joined.

but i get this error:
Код:
(105) : error 033: array must be indexed (variable "playerip")
This is my script:
Код:
public OnPlayerConnect(playerid)
{
	new playerip[16];
	GetPlayerIp(playerid,playerip,sizeof(playerip));
	if(playerip == [my ip])
	{
		new name[MAX_PLAYER_NAME],string[32];
		GetPlayerName(playerid,name,sizeof(name));
		format(string,sizeof(string),"ADMIN: %s joined",name);
		SendClientMessageToAll(COLOUR_LIGHTBLUE,string);
		PlayerPlaySound(playerid,1185,0,0,0);
		SendClientMessage(playerid,COLOUR_YELLOW,"Welcome admin!");
		return 1;
	}
	else
	{
		new name[MAX_PLAYER_NAME],string[32];
		GetPlayerName(playerid,name,sizeof(name));
		format(string,sizeof(string),"PLAYER: %s joined",name);
		SendClientMessageToAll(COLOUR_LIGHTBLUE,string);
		return 1;
}
}
Reply


Messages In This Thread
array must be indexed (variable "playerip") - by Naxix - 11.03.2010, 16:14
Re: array must be indexed (variable "playerip") - by Correlli - 11.03.2010, 16:18
Re: array must be indexed (variable "playerip") - by iLinx - 11.03.2010, 16:21

Forum Jump:


Users browsing this thread: 2 Guest(s)