Errors when compiling
#1

Quote:

error 017: undefined symbol "GateInfo"
warning 215: expression has no effect
error 001: expected token: ";", but found "]"
error 029: invalid expression, assumed zero
fatal error 107: too many error messages on one line

pawn Код:
CMD:gedit(playerid, params[])
{
    {
        new x_job[128], gateid, Float:ofloat, string[128];

        if(sscanf(params, "s[128]if", x_job, gateid, ofloat))
        {
            SendClientMessage(playerid, WHITE, "USAGE: /gedit [name] [gateid] [value]");
            SendClientMessage(playerid, GREY, "Available names: HID, Model, VW, Int, PosX(M), PosY(M), PosZ(M), RotX(M), RotZ(M)");
            SendClientMessage(playerid, GREY, "Available names: tome(m), range, speed, status, gate, renderhq");
            return 1;
        }

        if(strcmp(x_job, "hid", true) == 0)
        {
            new value = floatround(ofloat, floatround_round);
            if(value > MAX_HOUSES) return SendClientMessage(playerid, WHITE, "* Invalid House ID!");
******   GateInfo[gateid][gHID] = value;
            format(string, sizeof(string), "Gate HID assigned to %d", GateInfo[gateid][gHID]);
            SendClientMessage(playerid, WHITE, string);
            SaveGates();

            format(string, sizeof(string), "%s has edited GateID %d's House ID to %d.", GetPlayerNameEx(playerid), gateid, value);
            Log("logs/gedit.log", string);
        }
        else if(strcmp(x_job, "model", true) == 0)
        {
            new value = floatround(ofloat, floatround_round);

            if(value == 0)
            {
                GateInfo[gateid][gPosX] = 0.0;
                GateInfo[gateid][gPosY] = 0.0;
                GateInfo[gateid][gPosZ] = 0.0;
                GateInfo[gateid][gRotX] = 0.0;
                GateInfo[gateid][gRotY] = 0.0;
                GateInfo[gateid][gRotZ] = 0.0;
                GateInfo[gateid][gPosXM] = 0.0;
                GateInfo[gateid][gPosYM] = 0.0;
                GateInfo[gateid][gPosZM] = 0.0;
                GateInfo[gateid][gRotXM] = 0.0;
                GateInfo[gateid][gRotYM] = 0.0;
                GateInfo[gateid][gRotZM] = 0.0;
                GateInfo[gateid][gVW] = 0;
                GateInfo[gateid][gInt] = 0;
            }

            GateInfo[gateid][gModel] = value;
            format(string, sizeof(string), "Gate Model assigned to %d", GateInfo[gateid][gModel]);
            if(IsValidDynamicObject(GateInfo[gateid][gGATE])) DestroyDynamicObject(GateInfo[gateid][gGATE]);
            CreateGate(gateid);
            SendClientMessage(playerid, WHITE, string);
            SaveGates();

            format(string, sizeof(string), "%s has edited GateID %d's Model to %d.", GetPlayerNameEx(playerid), gateid, value);
            Log("logs/gedit.log", string);
        }
        else if(strcmp(x_job, "vw", true) == 0)
        {
            new value = floatround(ofloat, floatround_round);
            GateInfo[gateid][gVW] = value;
            format(string, sizeof(string), "Gate VW assigned to %d", GateInfo[gateid][gVW]);
            if(IsValidDynamicObject(GateInfo[gateid][gGATE])) DestroyDynamicObject(GateInfo[gateid][gGATE]);
            CreateGate(gateid);
            SendClientMessage(playerid, WHITE, string);
            SaveGates();

            format(string, sizeof(string), "%s has edited GateID %d's VW to %d.", GetPlayerNameEx(playerid), gateid, value);
            Log("logs/gedit.log", string);
        }
        else if(strcmp(x_job, "int", true) == 0)
        {
            new value = floatround(ofloat, floatround_round);
            GateInfo[gateid][gInt] = value;
            format(string, sizeof(string), "Gate Int assigned to %d", GateInfo[gateid][gInt]);
            if(IsValidDynamicObject(GateInfo[gateid][gGATE])) DestroyDynamicObject(GateInfo[gateid][gGATE]);
            CreateGate(gateid);
            SendClientMessage(playerid, WHITE, string);
            SaveGates();

            format(string, sizeof(string), "%s has edited GateID %d's InteriorID to %d.", GetPlayerNameEx(playerid), gateid, value);
            Log("logs/gedit.log", string);
        }
        else if(strcmp(x_job, "range", true) == 0)
        {
            new value = floatround(ofloat, floatround_round);
            GateInfo[gateid][gRange] = value;
            format(string, sizeof(string), "Gate Range assigned to %d", GateInfo[gateid][gRange]);
            SendClientMessage(playerid, WHITE, string);
            SaveGates();

            format(string, sizeof(string), "%s has edited GateID %d's Range to %d.", GetPlayerNameEx(playerid), gateid, value);
            Log("logs/gedit.log", string);
        }
        else if(strcmp(x_job, "speed", true) == 0)
        {
            new value = floatround(ofloat, floatround_round);
            GateInfo[gateid][gSpeed] = value;
            format(string, sizeof(string), "Gate Speed assigned to %d", GateInfo[gateid][gSpeed]);
            SendClientMessage(playerid, WHITE, string);
            SaveGates();

            format(string, sizeof(string), "%s has edited GateID %d's Speed to %d.", GetPlayerNameEx(playerid), gateid, value);
            Log("logs/gedit.log", string);
        }
        else if(strcmp(x_job, "posx", true) == 0)
        {
            new Float:value = ofloat;
            GateInfo[gateid][gPosX] = value;
            format(string, sizeof(string), "Gate PosX assigned to %f", GateInfo[gateid][gPosX]);
            SetDynamicObjectPos(GateInfo[gateid][gGATE], GateInfo[gateid][gPosX], GateInfo[gateid][gPosY], GateInfo[gateid][gPosZ]);
            SendClientMessage(playerid, WHITE, string);
            SaveGates();
        }
        else if(strcmp(x_job, "posy", true) == 0)
        {
            new Float:value = ofloat;
            GateInfo[gateid][gPosY] = value;
            format(string, sizeof(string), "Gate PosY assigned to %f", GateInfo[gateid][gPosY]);
            SetDynamicObjectPos(GateInfo[gateid][gGATE], GateInfo[gateid][gPosX], GateInfo[gateid][gPosY], GateInfo[gateid][gPosZ]);
            SendClientMessage(playerid, WHITE, string);
            SaveGates();
        }
        else if(strcmp(x_job, "posz", true) == 0)
        {
            new Float:value = ofloat;
            GateInfo[gateid][gPosZ] = value;
            format(string, sizeof(string), "Gate PosZ assigned to %f", GateInfo[gateid][gPosZ]);
            SetDynamicObjectPos(GateInfo[gateid][gGATE], GateInfo[gateid][gPosX], GateInfo[gateid][gPosY], GateInfo[gateid][gPosZ]);
            SendClientMessage(playerid, WHITE, string);
            SaveGates();
        }
        else if(strcmp(x_job, "posxm", true) == 0)
        {
            new Float:value = ofloat;
            GateInfo[gateid][gPosXM] = value;
            format(string, sizeof(string), "Gate PosXM assigned to %f", GateInfo[gateid][gPosXM]);
            SendClientMessage(playerid, WHITE, string);
            SaveGates();
        }
        else if(strcmp(x_job, "posym", true) == 0)
        {
            new Float:value = ofloat;
            GateInfo[gateid][gPosYM] = value;
            format(string, sizeof(string), "Gate PosYM assigned to %f", GateInfo[gateid][gPosYM]);
            SendClientMessage(playerid, WHITE, string);
            SaveGates();
        }
        else if(strcmp(x_job, "poszm", true) == 0)
        {
            new Float:value = ofloat;
            GateInfo[gateid][gPosZM] = value;
            format(string, sizeof(string), "Gate PosZM assigned to %f", GateInfo[gateid][gPosZM]);
            SendClientMessage(playerid, WHITE, string);
            SaveGates();
        }
        else if(strcmp(x_job, "rotx", true) == 0)
        {
            new Float:value = ofloat;
            GateInfo[gateid][gRotX] = value;
            format(string, sizeof(string), "Gate RotX assigned to %f", GateInfo[gateid][gRotX]);
            SetDynamicObjectRot(GateInfo[gateid][gGATE], GateInfo[gateid][gRotX],GateInfo[gateid][gRotY],GateInfo[gateid][gRotZ]);
            SendClientMessage(playerid, WHITE, string);
            SaveGates();
        }
        else if(strcmp(x_job, "roty", true) == 0)
        {
            new Float:value = ofloat;
            GateInfo[gateid][gRotY] = value;
            format(string, sizeof(string), "Gate RotY assigned to %f", GateInfo[gateid][gRotY]);
            SetDynamicObjectRot(GateInfo[gateid][gGATE], GateInfo[gateid][gRotX],GateInfo[gateid][gRotY],GateInfo[gateid][gRotZ]);
            SendClientMessage(playerid, WHITE, string);
            SaveGates();
        }
        else if(strcmp(x_job, "rotz", true) == 0)
        {
            new Float:value = ofloat;
            GateInfo[gateid][gRotZ] = value;
            format(string, sizeof(string), "Gate RotZ assigned to %f", GateInfo[gateid][gRotZ]);
            SetDynamicObjectRot(GateInfo[gateid][gGATE], GateInfo[gateid][gRotX],GateInfo[gateid][gRotY],GateInfo[gateid][gRotZ]);
            SendClientMessage(playerid, WHITE, string);
            SaveGates();
        }
        else if(strcmp(x_job, "rotxm", true) == 0)
        {
            new Float:value = ofloat;
            GateInfo[gateid][gRotXM] = value;
            format(string, sizeof(string), "Gate RotXM assigned to %f", GateInfo[gateid][gRotXM]);
            SendClientMessage(playerid, WHITE, string);
            SaveGates();
        }
        else if(strcmp(x_job, "rotym", true) == 0)
        {
            new Float:value = ofloat;
            GateInfo[gateid][gRotYM] = value;
            format(string, sizeof(string), "Gate RotYM assigned to %f", GateInfo[gateid][gRotYM]);
            SendClientMessage(playerid, WHITE, string);
            SaveGates();
        }
        else if(strcmp(x_job, "rotzm", true) == 0)
        {
            new Float:value = ofloat;
            GateInfo[gateid][gRotZM] = value;
            format(string, sizeof(string), "Gate RotZM assigned to %f", GateInfo[gateid][gRotZM]);
            SendClientMessage(playerid, WHITE, string);
            SaveGates();
        }
        else if(strcmp(x_job, "tome", true) == 0)
        {
            GetPlayerPos(playerid,GateInfo[gateid][gPosX],GateInfo[gateid][gPosY], GateInfo[gateid][gPosZ]);
            GateInfo[gateid][gVW] = GetPlayerVirtualWorld(playerid);
            GateInfo[gateid][gInt] = GetPlayerInterior(playerid);
            format(string, sizeof(string), "Gate Pos moved to %f %f %f, VW: %d INT: %d", GateInfo[gateid][gPosX], GateInfo[gateid][gPosY], GateInfo[gateid][gPosZ], GateInfo[gateid][gVW], GateInfo[gateid][gInt]);
            SendClientMessage(playerid, WHITE, string);
            if(GateInfo[gateid][gModel] == 0)
            {
                GateInfo[gateid][gModel] = 18631;
                GateInfo[gateid][gRange] = 10;
                GateInfo[gateid][gSpeed] = 5;
            }
            if(IsValidDynamicObject(GateInfo[gateid][gGATE])) DestroyDynamicObject(GateInfo[gateid][gGATE]);
            CreateGate(gateid);
            SaveGates();

            format(string, sizeof(string), "%s has edited GateID %d's Position.", GetPlayerNameEx(playerid), gateid);
            Log("logs/gedit.log", string);
        }
        else if(strcmp(x_job, "tomem", true) == 0)
        {
            GetPlayerPos(playerid,GateInfo[gateid][gPosXM],GateInfo[gateid][gPosYM], GateInfo[gateid][gPosZM]);
            format(string, sizeof(string), "Gate PosM moved to %f %f %f", GateInfo[gateid][gPosXM], GateInfo[gateid][gPosYM], GateInfo[gateid][gPosZM]);
            SendClientMessage(playerid, WHITE, string);
            SaveGates();

            format(string, sizeof(string), "%s has edited GateID %d's Moved Position.", GetPlayerNameEx(playerid), gateid);
            Log("logs/gedit.log", string);
        }
        else if(strcmp(x_job, "renderhq", true) == 0)
        {
            new value = floatround(ofloat, floatround_round);
            GateInfo[gateid][gRenderHQ] = value;
            format(string, sizeof(string), "Gate RenderHQ assigned to %d", GateInfo[gateid][gRenderHQ]);
            if(IsValidDynamicObject(GateInfo[gateid][gGATE])) DestroyDynamicObject(GateInfo[gateid][gGATE]);
            CreateGate(gateid);
            SendClientMessage(playerid, WHITE, string);
            SaveGates();

            format(string, sizeof(string), "%s has edited GateID %d's RenderHQ to %d.", GetPlayerNameEx(playerid), gateid, value);
            Log("logs/gedit.log", string);
        }
    }
    else
    {
        SendClientMessage(playerid, COLOR_GRAD2, "You are not authorized to use that command!");
        return 1;
    }
    return 1;
}
The error is getting on the **** line.
Reply
#2

Judging by the code you've provided, GateInfo[][] hasn't been defined globally. Search for the array elsewhere in the script. Try to figure out it's purpose and globalize it if that seems like a suitable solution.

I defined the variable globally as a test, that resulted in 26 further errors. I have cleaned the code up slightly, for some reason there was a missing logic statement, therefore making the proceeding else statement redundant.

http://pastebin.com/QATEdSqH

Код:
CMD:gedit(playerid, params[])
{
	if(true) //Replace this with some meaningful access checking logic.
    {
        new x_job[128], gateid, Float:ofloat, string[128];

        if(sscanf(params, "s[128]if", x_job, gateid, ofloat))
        {
            SendClientMessage(playerid, WHITE, "USAGE: /gedit [name] [gateid] [value]");
            SendClientMessage(playerid, GREY, "Available names: HID, Model, VW, Int, PosX(M), PosY(M), PosZ(M), RotX(M), RotZ(M)");
            SendClientMessage(playerid, GREY, "Available names: tome(m), range, speed, status, gate, renderhq");
            return 1;
        }

        if(strcmp(x_job, "hid", true) == 0)
        {
            new value = floatround(ofloat, floatround_round);
            if(value > MAX_HOUSES) return SendClientMessage(playerid, WHITE, "* Invalid House ID!");
			GateInfo[gateid][gHID] = value;
            format(string, sizeof(string), "Gate HID assigned to %d", GateInfo[gateid][gHID]);
            SendClientMessage(playerid, WHITE, string);
            SaveGates();

            format(string, sizeof(string), "%s has edited GateID %d's House ID to %d.", GetPlayerNameEx(playerid), gateid, value);
            Log("logs/gedit.log", string);
        }
        else if(strcmp(x_job, "model", true) == 0)
        {
            new value = floatround(ofloat, floatround_round);

            if(value == 0)
            {
                GateInfo[gateid][gPosX] = 0.0;
                GateInfo[gateid][gPosY] = 0.0;
                GateInfo[gateid][gPosZ] = 0.0;
                GateInfo[gateid][gRotX] = 0.0;
                GateInfo[gateid][gRotY] = 0.0;
                GateInfo[gateid][gRotZ] = 0.0;
                GateInfo[gateid][gPosXM] = 0.0;
                GateInfo[gateid][gPosYM] = 0.0;
                GateInfo[gateid][gPosZM] = 0.0;
                GateInfo[gateid][gRotXM] = 0.0;
                GateInfo[gateid][gRotYM] = 0.0;
                GateInfo[gateid][gRotZM] = 0.0;
                GateInfo[gateid][gVW] = 0;
                GateInfo[gateid][gInt] = 0;
            }

            GateInfo[gateid][gModel] = value;
            format(string, sizeof(string), "Gate Model assigned to %d", GateInfo[gateid][gModel]);
            if(IsValidDynamicObject(GateInfo[gateid][gGATE])) DestroyDynamicObject(GateInfo[gateid][gGATE]);
            CreateGate(gateid);
            SendClientMessage(playerid, WHITE, string);
            SaveGates();

            format(string, sizeof(string), "%s has edited GateID %d's Model to %d.", GetPlayerNameEx(playerid), gateid, value);
            Log("logs/gedit.log", string);
        }
        else if(strcmp(x_job, "vw", true) == 0)
        {
            new value = floatround(ofloat, floatround_round);
            GateInfo[gateid][gVW] = value;
            format(string, sizeof(string), "Gate VW assigned to %d", GateInfo[gateid][gVW]);
            if(IsValidDynamicObject(GateInfo[gateid][gGATE])) DestroyDynamicObject(GateInfo[gateid][gGATE]);
            CreateGate(gateid);
            SendClientMessage(playerid, WHITE, string);
            SaveGates();

            format(string, sizeof(string), "%s has edited GateID %d's VW to %d.", GetPlayerNameEx(playerid), gateid, value);
            Log("logs/gedit.log", string);
        }
        else if(strcmp(x_job, "int", true) == 0)
        {
            new value = floatround(ofloat, floatround_round);
            GateInfo[gateid][gInt] = value;
            format(string, sizeof(string), "Gate Int assigned to %d", GateInfo[gateid][gInt]);
            if(IsValidDynamicObject(GateInfo[gateid][gGATE])) DestroyDynamicObject(GateInfo[gateid][gGATE]);
            CreateGate(gateid);
            SendClientMessage(playerid, WHITE, string);
            SaveGates();

            format(string, sizeof(string), "%s has edited GateID %d's InteriorID to %d.", GetPlayerNameEx(playerid), gateid, value);
            Log("logs/gedit.log", string);
        }
        else if(strcmp(x_job, "range", true) == 0)
        {
            new value = floatround(ofloat, floatround_round);
            GateInfo[gateid][gRange] = value;
            format(string, sizeof(string), "Gate Range assigned to %d", GateInfo[gateid][gRange]);
            SendClientMessage(playerid, WHITE, string);
            SaveGates();

            format(string, sizeof(string), "%s has edited GateID %d's Range to %d.", GetPlayerNameEx(playerid), gateid, value);
            Log("logs/gedit.log", string);
        }
        else if(strcmp(x_job, "speed", true) == 0)
        {
            new value = floatround(ofloat, floatround_round);
            GateInfo[gateid][gSpeed] = value;
            format(string, sizeof(string), "Gate Speed assigned to %d", GateInfo[gateid][gSpeed]);
            SendClientMessage(playerid, WHITE, string);
            SaveGates();

            format(string, sizeof(string), "%s has edited GateID %d's Speed to %d.", GetPlayerNameEx(playerid), gateid, value);
            Log("logs/gedit.log", string);
        }
        else if(strcmp(x_job, "posx", true) == 0)
        {
            new Float:value = ofloat;
            GateInfo[gateid][gPosX] = value;
            format(string, sizeof(string), "Gate PosX assigned to %f", GateInfo[gateid][gPosX]);
            SetDynamicObjectPos(GateInfo[gateid][gGATE], GateInfo[gateid][gPosX], GateInfo[gateid][gPosY], GateInfo[gateid][gPosZ]);
            SendClientMessage(playerid, WHITE, string);
            SaveGates();
        }
        else if(strcmp(x_job, "posy", true) == 0)
        {
            new Float:value = ofloat;
            GateInfo[gateid][gPosY] = value;
            format(string, sizeof(string), "Gate PosY assigned to %f", GateInfo[gateid][gPosY]);
            SetDynamicObjectPos(GateInfo[gateid][gGATE], GateInfo[gateid][gPosX], GateInfo[gateid][gPosY], GateInfo[gateid][gPosZ]);
            SendClientMessage(playerid, WHITE, string);
            SaveGates();
        }
        else if(strcmp(x_job, "posz", true) == 0)
        {
            new Float:value = ofloat;
            GateInfo[gateid][gPosZ] = value;
            format(string, sizeof(string), "Gate PosZ assigned to %f", GateInfo[gateid][gPosZ]);
            SetDynamicObjectPos(GateInfo[gateid][gGATE], GateInfo[gateid][gPosX], GateInfo[gateid][gPosY], GateInfo[gateid][gPosZ]);
            SendClientMessage(playerid, WHITE, string);
            SaveGates();
        }
        else if(strcmp(x_job, "posxm", true) == 0)
        {
            new Float:value = ofloat;
            GateInfo[gateid][gPosXM] = value;
            format(string, sizeof(string), "Gate PosXM assigned to %f", GateInfo[gateid][gPosXM]);
            SendClientMessage(playerid, WHITE, string);
            SaveGates();
        }
        else if(strcmp(x_job, "posym", true) == 0)
        {
            new Float:value = ofloat;
            GateInfo[gateid][gPosYM] = value;
            format(string, sizeof(string), "Gate PosYM assigned to %f", GateInfo[gateid][gPosYM]);
            SendClientMessage(playerid, WHITE, string);
            SaveGates();
        }
        else if(strcmp(x_job, "poszm", true) == 0)
        {
            new Float:value = ofloat;
            GateInfo[gateid][gPosZM] = value;
            format(string, sizeof(string), "Gate PosZM assigned to %f", GateInfo[gateid][gPosZM]);
            SendClientMessage(playerid, WHITE, string);
            SaveGates();
        }
        else if(strcmp(x_job, "rotx", true) == 0)
        {
            new Float:value = ofloat;
            GateInfo[gateid][gRotX] = value;
            format(string, sizeof(string), "Gate RotX assigned to %f", GateInfo[gateid][gRotX]);
            SetDynamicObjectRot(GateInfo[gateid][gGATE], GateInfo[gateid][gRotX],GateInfo[gateid][gRotY],GateInfo[gateid][gRotZ]);
            SendClientMessage(playerid, WHITE, string);
            SaveGates();
        }
        else if(strcmp(x_job, "roty", true) == 0)
        {
            new Float:value = ofloat;
            GateInfo[gateid][gRotY] = value;
            format(string, sizeof(string), "Gate RotY assigned to %f", GateInfo[gateid][gRotY]);
            SetDynamicObjectRot(GateInfo[gateid][gGATE], GateInfo[gateid][gRotX],GateInfo[gateid][gRotY],GateInfo[gateid][gRotZ]);
            SendClientMessage(playerid, WHITE, string);
            SaveGates();
        }
        else if(strcmp(x_job, "rotz", true) == 0)
        {
            new Float:value = ofloat;
            GateInfo[gateid][gRotZ] = value;
            format(string, sizeof(string), "Gate RotZ assigned to %f", GateInfo[gateid][gRotZ]);
            SetDynamicObjectRot(GateInfo[gateid][gGATE], GateInfo[gateid][gRotX],GateInfo[gateid][gRotY],GateInfo[gateid][gRotZ]);
            SendClientMessage(playerid, WHITE, string);
            SaveGates();
        }
        else if(strcmp(x_job, "rotxm", true) == 0)
        {
            new Float:value = ofloat;
            GateInfo[gateid][gRotXM] = value;
            format(string, sizeof(string), "Gate RotXM assigned to %f", GateInfo[gateid][gRotXM]);
            SendClientMessage(playerid, WHITE, string);
            SaveGates();
        }
        else if(strcmp(x_job, "rotym", true) == 0)
        {
            new Float:value = ofloat;
            GateInfo[gateid][gRotYM] = value;
            format(string, sizeof(string), "Gate RotYM assigned to %f", GateInfo[gateid][gRotYM]);
            SendClientMessage(playerid, WHITE, string);
            SaveGates();
        }
        else if(strcmp(x_job, "rotzm", true) == 0)
        {
            new Float:value = ofloat;
            GateInfo[gateid][gRotZM] = value;
            format(string, sizeof(string), "Gate RotZM assigned to %f", GateInfo[gateid][gRotZM]);
            SendClientMessage(playerid, WHITE, string);
            SaveGates();
        }
        else if(strcmp(x_job, "tome", true) == 0)
        {
            GetPlayerPos(playerid,GateInfo[gateid][gPosX],GateInfo[gateid][gPosY], GateInfo[gateid][gPosZ]);
            GateInfo[gateid][gVW] = GetPlayerVirtualWorld(playerid);
            GateInfo[gateid][gInt] = GetPlayerInterior(playerid);
            format(string, sizeof(string), "Gate Pos moved to %f %f %f, VW: %d INT: %d", GateInfo[gateid][gPosX], GateInfo[gateid][gPosY], GateInfo[gateid][gPosZ], GateInfo[gateid][gVW], GateInfo[gateid][gInt]);
            SendClientMessage(playerid, WHITE, string);
            if(GateInfo[gateid][gModel] == 0)
            {
                GateInfo[gateid][gModel] = 18631;
                GateInfo[gateid][gRange] = 10;
                GateInfo[gateid][gSpeed] = 5;
            }
            if(IsValidDynamicObject(GateInfo[gateid][gGATE])) DestroyDynamicObject(GateInfo[gateid][gGATE]);
            CreateGate(gateid);
            SaveGates();

            format(string, sizeof(string), "%s has edited GateID %d's Position.", GetPlayerNameEx(playerid), gateid);
            Log("logs/gedit.log", string);
        }
        else if(strcmp(x_job, "tomem", true) == 0)
        {
            GetPlayerPos(playerid,GateInfo[gateid][gPosXM],GateInfo[gateid][gPosYM], GateInfo[gateid][gPosZM]);
            format(string, sizeof(string), "Gate PosM moved to %f %f %f", GateInfo[gateid][gPosXM], GateInfo[gateid][gPosYM], GateInfo[gateid][gPosZM]);
            SendClientMessage(playerid, WHITE, string);
            SaveGates();

            format(string, sizeof(string), "%s has edited GateID %d's Moved Position.", GetPlayerNameEx(playerid), gateid);
            Log("logs/gedit.log", string);
        }
        else if(strcmp(x_job, "renderhq", true) == 0)
        {
            new value = floatround(ofloat, floatround_round);
            GateInfo[gateid][gRenderHQ] = value;
            format(string, sizeof(string), "Gate RenderHQ assigned to %d", GateInfo[gateid][gRenderHQ]);
            if(IsValidDynamicObject(GateInfo[gateid][gGATE])) DestroyDynamicObject(GateInfo[gateid][gGATE]);
            CreateGate(gateid);
            SendClientMessage(playerid, WHITE, string);
            SaveGates();

            format(string, sizeof(string), "%s has edited GateID %d's RenderHQ to %d.", GetPlayerNameEx(playerid), gateid, value);
            Log("logs/gedit.log", string);
        }
    }
    else
    {
        SendClientMessage(playerid, COLOR_GRAD2, "You are not authorized to use that command!");
        return 1;
    }
    return 1;
}
Good luck!
Reply
#3

Quote:
Originally Posted by Simeon87
Посмотреть сообщение
if(true) //Replace this with some meaningful access checking logic.
Код:
	if(Player[playerid][AdminLevel] >= 3)
Still the same error
Reply
#4

it means that u didn't define GateInfo you need to define it example:
pawn Код:
new GateInfo[MAX_PLAYERS][enumhere];
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)