PDA

Просмотр полной версии : [Вопрос] crashdetect



Freaky
04.02.2017, 17:20
new Float:percent;
percent = ((pInfo[i][pExp] * 100) / XPneed);
SetPlayerProgressBarValue(i, barxp, percent);
HidePlayerProgressBar(i, barxp);
ShowPlayerProgressBar(i, barxp);

Crashdetect ругается на эту строчку:


percent = ((pInfo[i][pExp] * 100) / XPneed);


Run time error 11: "Divide by zero"
[16:16:01] [debug] AMX backtrace:
[16:16:01] [debug] #0 0002cd24 in public MinUpdate () at C:\Users\admin\Desktop\Allarion Project\gamemodes\Untitled.pwn:2623

Nexius_Tailer
04.02.2017, 17:21
pInfo[i][pExp] либо XPneed равно нулю