help bug
#1

I have a problem when the edit gate .
----------------
else if(strcmp(x_job, "open", true) == 0)
{
foreach(new i:Player)
{
if(GetPVarInt(i, "EditingGateID") == gateid && i != playerid)
{
format(string, sizeof(string), "ERROR: %s (ID: %d) is currently editing this gate.", gateid);
return SendClientMessage(playerid, COLOR_WHITE, string);
}
}
SetPVarInt(playerid, "gEdit", 1);
SetPVarInt(playerid, "EditingGateID", gateid);
SetDynamicObjectPos(GateInfo[gateid][gGATE], GateInfo[gateid][gPosX], GateInfo[gateid][gPosY], GateInfo[gateid][gPosZ]);
SetDynamicObjectRot(GateInfo[gateid][gGATE], GateInfo[gateid][gRotX], GateInfo[gateid][gRotY], GateInfo[gateid][gRotZ]);
EditDynamicObject(playerid, GateInfo[gateid][gGATE]);
format(string, sizeof(string), "You are now editing the open position of Gate %d.", gateid);

SendMessage(playerid, COLOR_WHITE, string);
SaveGates();
SendClientMessage(playerid, COLOR_WHITE, string);
SendClientMessage(playerid, 0xFFFFAAAA, "HINT: Hold {8000FF}~k~~PED_SPRINT~ {FFFFAA}to move your camera, press escape to cancel");
}
------------------
sever log10:30:27] [debug] Run time error 4: "Array index out of bounds"
[10:30:27] [debug] Accessing element at negative index -1
[10:30:27] [debug] AMX backtrace:
[10:30:27] [debug] #0 001f057c in ?? (0x00000000, 0x000007c3, 0x00000002, 0x44bf3333, 0xc4d36666, 0x41562000, 0x00000000, 0x00000000, 0x00000000) from OOAK.amx
[10:30:27] [debug] #1 00011b50 in public OnPlayerEditDynamicObject (0x00000000, 0x000007c3, 0x00000002, 0x44bf3333, 0xc4d36666, 0x41562000, 0x00000000, 0x00000000, 0x00000000) from OOAK.amx
[10:30:27] [debug] #2 native Streamer_CallbackHook () from streamer.DLL
[10:30:27] [debug] #3 00006c40 in public OnPlayerEditObject (0x00000000, 0x00000001, 0x000003e6, 0x00000002, 0x44bf3333, 0xc4d36666, 0x41562000, 0x00000000, 0x00000000, 0x00000000) from OOAK.amx
[10:30:28] [debug] Run time error 4: "Array index out of bounds"
[10:30:28] [debug] Accessing element at negative index -1
Help me
Reply
#2

have you tried to compile OOAK.pwn?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)