15.08.2014, 00:26
Код:
[03:13:21] [debug] Run time error 4: "Array index out of bounds" [03:13:21] [debug] Accessing element at negative index -1 [03:13:21] [debug] AMX backtrace: [03:13:21] [debug] #0 001168f4 in public OnPlayerStateChange (0x00000003, 0x00000003, 0x00000001) from egsrp.amx
Код:
if(newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER) { new CarIDs = GetPlayerVehicleID(playerid), BuyCarID = GetBuyCarId(playerid); new CarModel = GetVehicleModel(CarIDs); if(CarInfo[BuyCarID][cRadio] == 1 || CarInfo[BuyCarID][cRadio] == 2) { switch(CarRadioWorks[CarIDs]) { case 0: StopAudioStreamForPlayer(playerid); case 1: PlayAudioStreamForPlayer(playerid, "http://radiopage2.com"); case 2: PlayAudioStreamForPlayer(playerid, "http://radiopage3.com"); case 3: PlayAudioStreamForPlayer(playerid, "http://radiopage4.com"); } } switch(CarModel) { case 592,577,511,512,520,593,553,476,519,460,513,548,425,417,487,488,497,563,447,469: PlayerInfo[playerid][pWeapons][46] = true; case 457: PlayerInfo[playerid][pWeapons][2] = true; case 596,597,598,599: PlayerInfo[playerid][pWeapons][25] = true; } }