04.11.2015, 12:21
Hey, today I tested car buying system and happened idk what. Just when I buying a car all OK, then my mapper wants to press on button 'buy' textdraws getting crashed.
Crash:
ucl.pwn:764
cars.pwn:189
WTF? For me nothing happens but for player who's ID is 1 doesnt work and in my console showing this crash
Any ideas?
Crash:
Код:
[15:17:20] [debug] Run time error 4: "Array index out of bounds" [15:17:20] [debug] Accessing element at negative index -400 [15:17:20] [debug] AMX backtrace: [15:17:20] [debug] #0 0006cffc in GetVehicleName (veh=0) at systems/cars.pwn:189 [15:17:20] [debug] #1 00081534 in public OnPlayerClickPlayerTextDraw (playerid=1, PlayerText:playertextid=4) at ucl.pwn:764
Код:
format ( string , sizeof ( string ) , "Jus jau turite 2 tr. priemonės. ({fcbd56}%s{ecf0f1}, {fcbd56}%s{ecf0f1})" , GetVehicleName ( pCar1 [ playerid ] ) , GetVehicleName ( pCar2 [ playerid ] ) ) ;
Код:
stock GetVehicleName(veh) return VehicleNames [ GetVehicleModel ( veh ) - 400 ] ;
Any ideas?