Problem| error 033: array must be indexed (variable "in")
#1

Well im building a script but im not really big scripter
so:
Код:
   if(!strcmp(cmdtext, "/exit", true))
   {
	new in[128];
	in = GetPlayerInterior(playerid);
	if(in == 17)
	{
	    SetPlayerInterior(playerid, 0);
	    SetPlayerPos(playerid, 2197.6472,1452.2587,11.0547);
	}
	if(in == 3)
	{
	    SetPlayerInterior(playerid, 0);
	    SetPlayerPos(playerid, 2197.7957,1467.3552,11.0547);
	}
             if(in == 12)
	{
	    SetPlayerInterior(playerid, 0);
	    SetPlayerPos(playerid, 2177.5181,1450.8146,10.8203);
	}
	if(in == 0)
	{
	    SendClientMessage(playerid, Error, "You are not in Building!");
	}
    }
Error:
Код:
error 033: array must be indexed (variable "in")
error 033: array must be indexed (variable "in")
error 033: array must be indexed (variable "in")
error 033: array must be indexed (variable "in")
HELP!!!!
Reply
#2

pawn Код:
if(!strcmp(cmdtext, "/exit", true))
{
    new in = GetPlayerInterior(playerid);
    if(in == 17)
    {
        SetPlayerInterior(playerid, 0);
        SetPlayerPos(playerid, 2197.6472,1452.2587,11.0547);
    }
    if(in == 3)
    {
        SetPlayerInterior(playerid, 0);
        SetPlayerPos(playerid, 2197.7957,1467.3552,11.0547);
    }
             if(in == 12)
    {
        SetPlayerInterior(playerid, 0);
        SetPlayerPos(playerid, 2177.5181,1450.8146,10.8203);
    }
    if(in == 0)
    {
        SendClientMessage(playerid, Error, "You are not in Building!");
    }
}
Reply
#3

Thanks!
I will do that
Reply
#4

Yes it's work Thank you very much!
Reply
#5

I have Another way of doing that Aswell, but it Involves Mapping your Own Interriors
pawn Код:
if (strcmp("/enter", cmdtext, true, 6) == 0)
        {
        if(IsPlayerInRangeOfPoint(playerid,5,1351.2615966797, 348.85372924805, 19.296350479126))// Set your own things, iterriors in the sky
       
        SetPlayerPos(playerid, 1283.73937988,65.11292267,1869.44262695);

        if(IsPlayerInRangeOfPoint(playerid,5, 83.93970489502, -149.35932922363, 2.2334928512573))

        SetPlayerPos(playerid, 201.94351196289, -171.447265625, 1691.2509765625);
       
        if(IsPlayerInRangeOfPoint(playerid, 5, 2250.9282226563, 28.268028259277, 26.07635307312))
       
        SetPlayerPos(playerid, 2324.8288574219, 15.295373916626, 1685.5080566406);
       
        if(IsPlayerInRangeOfPoint(playerid, 5, 135.29821777344, 1950.1235351563, 19.037788391113))

        SetPlayerPos(playerid, 135.02590942383, 1935.3071289063, 18.914943695068);
        return 1;
        }

       
    if (strcmp("/exit", cmdtext, true, 6) == 0)
        {
        if(IsPlayerInRangeOfPoint(playerid,5, 1283.73937988,65.11292267,1869.44262695))

        SetPlayerPos(playerid, 1351.2615966797, 348.85372924805, 19.296350479126);

        if(IsPlayerInRangeOfPoint(playerid,5, 201.94351196289, -171.447265625, 1690.2509765625))

        SetPlayerPos(playerid, 83.93970489502, -149.35932922363, 2.2334928512573);
       
        if(IsPlayerInRangeOfPoint(playerid,5, 2324.8288574219, 15.295373916626, 1684.0080566406))

        SetPlayerPos(playerid, 2250.9282226563, 28.268028259277, 26.07635307312);
       
        if(IsPlayerInRangeOfPoint(playerid, 5,135.02590942383, 1935.3071289063, 18.914943695068))
       
        SetPlayerPos(playerid, 135.29821777344, 1950.1235351563, 19.037788391113);
        return 1;
        }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)