error 033: array must be indexed (variable "text")
#1

Pawno give me warning:error 033: array must be indexed (variable "text")
I want to check string is same
Please tell me how do I do that.
Код:
TeleportPlayer(playerid, Float:x, Float:y, Float:z, Float:a, interiorid = 0, worldid = 0, text[] = "", freeze = 0)//非常重要的
{
	SetPlayerInterior(playerid, interiorid);
	SetPlayerVirtualWorld(playerid, worldid);
	SetCameraBehindPlayer(playerid);
	SetPVarInt(playerid,"IIH",0);
	if(	IsPlayerInAnyVehicle(playerid) &&
		GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
	{
	    new vehicleid = GetPlayerVehicleID(playerid);
	    foreach(new i : Player)
	    {
	        if(	GetPlayerVehicleID(i) == vehicleid &&
				i != playerid)
			{
			    SetPlayerInterior(i, interiorid);
			    SetPlayerVirtualWorld(i, worldid);
			}

			if(GIV(playerid)==0){LinkVehicleToInterior(vehicleid, interiorid);}
			SetVehicleVirtualWorld(vehicleid, worldid);

			SetVehiclePos(vehicleid, x, y, z);
			SetVehicleZAngle(vehicleid, a);
	    }
	}
	else
	{
	    SetPlayerPos(playerid, x, y, z);
	    if(a != 0){SetPlayerFacingAngle(playerid, a);}
	}
	if(freeze==1){Freeze(playerid);}
	if(text!="none")//This line warning!!!
	{
    new string[128], pName[MAX_PLAYER_NAME];
    GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
    format(string, sizeof(string), text, pName);
    SendClientMessageToAll(ServerColors[random(sizeof(ServerColors))], string);
    }
	return 1;
}
Reply


Messages In This Thread
error 033: array must be indexed (variable "text") - by 3417512908 - 19.06.2018, 04:09
Re: error 033: array must be indexed (variable "text") - by GTLS - 19.06.2018, 06:22
Re: error 033: array must be indexed (variable "text") - by coool - 19.06.2018, 07:00

Forum Jump:


Users browsing this thread: 2 Guest(s)