[22:47:01] [debug] Run time error 5: "Invalid memory access" [22:47:01] [debug] AMX backtrace: [22:47:01] [debug] #0 001787f0 in public OnPlayerKeyStateChange () from PCNR.amx [22:47:49] [death] E98uz died 255 [22:52:14] [chat] [E98uz]: UWAU [22:58:11] [debug] Run time error 5: "Invalid memory access" [22:58:11] [debug] AMX backtrace: [22:58:11] [debug] #0 001787f0 in public OnPlayerKeyStateChange () from PCNR.amx |
Run time error 4: "Array index out of bounds" [23:18:51] [debug] Accessing element at negative index -1 [23:18:51] [debug] AMX backtrace: [23:18:51] [debug] #0 000d97c4 in public n_OnVehicleRespray (0, 375, 67, 67) from PCNR.amx [23:18:51] [debug] #1 native CallLocalFunction () from sampsvr-port_2503 [23:18:51] [debug] #2 00020568 in public OnVehicleRespray (0, 375, 67, 67) from PCNR.amx [23:18:57] [debug] Run time error 4: "Array index out of bounds" [23:18:57] [debug] Accessing element at negative index -1 |
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { if(newkeys & KEY_JUMP && !(oldkeys & KEY_JUMP) && GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_CUFFED) ApplyAnimation(playerid, "GYMNASIUM", "gym_jog_falloff",4.1,0,1,1,0,0);//Credits to MP2 if(GetPlayerAnimationIndex(playerid) == 1660 || GetPlayerAnimationIndex(playerid) == 1661) { GivePlayerCash(playerid, -1); return 1; }//Drink machine/s if(IsPlayerUsingAnim{playerid} == true && newkeys == KEY_SECONDARY_ATTACK) { if(GetPlayerSpecialAction(playerid) != SPECIAL_ACTION_NONE) { SetPlayerSpecialAction(playerid, SPECIAL_ACTION_NONE); } ClearAnimations(playerid); IsPlayerUsingAnim{playerid} = false; } if(newkeys == KEY_SUBMISSION) { new vehicleid = GetPlayerVehicleID(playerid); if(GetVehicleModel(vehicleid) == 407) { return cmd_fire(playerid, ""); } if (newkeys == KEY_SUBMISSION) { if(TruckEligibleCar(vehicleid)) // If the car is trucking eligible { return cmd_startjob(playerid, ""); } } if (newkeys == KEY_SUBMISSION) { TextDrawHideForPlayer(playerid, Policerefill); TextDrawHideForPlayer(playerid, Policerefill2); TextDrawHideForPlayer(playerid, Weapons); TextDrawHideForPlayer(playerid, Armour); TextDrawHideForPlayer(playerid, Cars); TextDrawHideForPlayer(playerid, Textdraw110); TextDrawHideForPlayer(playerid, Textdraw111); TextDrawHideForPlayer(playerid, Textdraw112); TextDrawHideForPlayer(playerid, Textdraw113); TextDrawHideForPlayer(playerid, Textdraw114); TextDrawHideForPlayer(playerid, Textdraw115); TextDrawHideForPlayer(playerid, Textdraw116); TextDrawHideForPlayer(playerid, Textdraw117); TextDrawHideForPlayer(playerid, Sellcar1); TextDrawHideForPlayer(playerid, Sellyourcar); TextDrawHideForPlayer(playerid, Sellcar); TextDrawHideForPlayer(playerid, Nosell); } } return 1; } |
public OnVehicleRespray(playerid, vehicleid, color1, color2) { if(IsShopVehicle[vehicleid] != 1 && !strcmp(GetName(playerid), VehicleInfo[vehicleid][vOwner], false)) { VehicleInfo[IsShopVehicle[vehicleid]][vColor1] = color1; VehicleInfo[IsShopVehicle[vehicleid]][vColor2] = color2; SaveVehicleStats(IsShopVehicle[vehicleid]); } return 1; } |
This is because of the infinite loops I think.
So undo your previous edits, maybe it will fix. |
VehicleInfo[IsShopVehicle[vehicleid]][vColor1] = color1; VehicleInfo[IsShopVehicle[vehicleid]][vColor2] = color2;
For your array index out of bounds. I am guessing it is that IsShopVehicle will return a value -1 and you are trying to get the array with this:
Код:
VehicleInfo[IsShopVehicle[vehicleid]][vColor1] = color1; VehicleInfo[IsShopVehicle[vehicleid]][vColor2] = color2; |