error 090: public functions may not return arrays (symbol "InsertState")
#1

Hi,

I made a function, but it returns `error 090: public functions may not return arrays (symbol "InsertState")`

My code:
Код:
public InsertState(playerid, reason)
{
	new Username = GetPlayersRealId(playerid);
	new usersname[MAX_PLAYER_NAME];
	GetPlayerName(playerid, usersname, sizeof(usersname));
	new string[900];
	new realreason[255];
	switch(reason)
	{
	    case 0:
	    {
	        realreason = "Has left";
	    }
	    case 1:
	    {
	        realreason = "Has been kicked";
	    }
	    case 2:
	    {
	        realreason = "Has joined";
	    }
	    case 3:
	    {
	        realreason = "Has been banned";
	    }
	    case 4:
	    {
	        realreason = "Has been killed";
	    }
	    case 5:
	    {
	        realreason = "Has turned on the radio";
	    }
	}
	format(string, sizeof(string), "INSERT INTO `updates` (id, uid, reason, time) VALUES ('', '%s', '$s', UNIX_TIMESTAMP())", Username, realreason);
	mysql_query(string);
	new back[255];
	format(back, sizeof(back), "StateUpdate for player %s: %s", usersname, realreason);
	return back;
}
Does anyone know the problem?
Reply


Messages In This Thread
error 090: public functions may not return arrays (symbol "InsertState") - by trukker1998 - 05.04.2014, 12:53
Re: error 090: public functions may not return arrays (symbol "InsertState") - by Konstantinos - 05.04.2014, 12:57
Re: error 090: public functions may not return arrays (symbol "InsertState") - by Vince - 05.04.2014, 13:59
Re: error 090: public functions may not return arrays (symbol "InsertState") - by trukker1998 - 06.04.2014, 11:16

Forum Jump:


Users browsing this thread: 2 Guest(s)