Help me with the error please
#2

Yes, that line causing it. cModel is 0 and subtracts 400 from it.

Currently, the script is faulty. pCarKey is > 0 so this means that vehicle exists but the model is none. Reasons:
1) You do not reset pCarKey if car is removed from player's vehicles.
2) You do not load model of car correctly.

Find the reason and fix it. Until then, a way to prevent it is to check model instead.
pawn Код:
new car = PlayerInfo[playerid][pCarKey][i];
if (CarInfo[car][cModel] == 0) continue;
If model is 0, it will execute next iteration.

Oh and create variables outside (before) of loops, as well as show the dialog only once after the loop.
Reply


Messages In This Thread
Help me with the error please - by Yuri8 - 03.07.2018, 09:36
Re: Help me with the error please - by Calisthenics - 03.07.2018, 09:50
Re: Help me with the error please - by Sew_Sumi - 03.07.2018, 11:44

Forum Jump:


Users browsing this thread: 1 Guest(s)