30.08.2019, 19:14
(
Last edited by MaestrulFritz; 30/08/2019 at 07:58 PM.
)
Hello everyone! I have this problem as I am very new to scripting
This is the command:
I also got this :
Code:
[debug] AMX backtrace: [22:09:55] [debug] #0 004ae518 in public cmd_exitgarage (0, 10500072) from GM.amx [22:09:55] [debug] #1 native CallLocalFunction () from samp-server.exe [22:09:55] [debug] #2 0000089c in public OnPlayerCommandText (0, 10500024) from GM.amx [22:09:57] [debug] Run time error 4: "Array index out of bounds" [22:09:57] [debug] Attempted to read/write array element at negative index -1
Code:
CMD:exitgarage(playerid, params[]) { if(pInfo[playerid][aVar][61] != -1 && IsPlayerInRangeOfPoint(playerid, 3.0, 1341.2281,-1548.8905,10037.3174)) if(GetPlayerState(playerid) == 2) { SetVehicleVirtualWorld(pInfo[playerid][aVar][1], 0), SetVehiclePos(pInfo[playerid][aVar][1], Houses[pInfo[playerid][aVar][61]][GEnterX], Houses[pInfo[playerid][aVar][61]][GEnterY], Houses[pInfo[playerid][aVar][61]][GEnterZ]), SetPlayerPos(playerid, Houses[pInfo[playerid][aVar][61]][GEnterX], Houses[pInfo[playerid][aVar][61]][GEnterY], Houses[pInfo[playerid][aVar][61]][GEnterZ]), SetPlayerVirtualWorldEx(playerid, Iter_Contains(Warp, playerid) || Iter_Contains(Warp2, playerid) ? (pInfo[playerid][aVar][87]) : (0)), PutPlayerInVehicle(playerid, pInfo[playerid][aVar][1], 0); pInfo[playerid][aVar][61] = -1; } if(GetPlayerState(playerid) == 1) { SetPlayerPos(playerid, Houses[pInfo[playerid][aVar][61]][GEnterX], Houses[pInfo[playerid][aVar][61]][GEnterY], Houses[pInfo[playerid][aVar][61]][GEnterZ]), SetPlayerVirtualWorldEx(playerid, Iter_Contains(Warp, playerid) || Iter_Contains(Warp2, playerid) ? (pInfo[playerid][aVar][87]) : (0)), pInfo[playerid][aVar][61] = -1; } return 1; }
Code:
[22:53:15] [debug] Run time error 4: "Array index out of bounds" [22:53:15] [debug] Attempted to read/write array element at negative index -1 [22:53:15] [debug] AMX backtrace: [22:53:15] [debug] #0 003568c0 in public OnPlayerLogin (1) from GM.amx