 |
|
Veteran Member
Join Date: Feb 2007
Location: Tennessee
|

07-13-2012
, 18:58
Re: [AMXX] Run time error 11: divide
|
#3
|
Quote:
Originally Posted by striker07
What am i doing wrong here?
ingame it doesnt divide the 2 vallues, the result is always 0.00 no matter ho many kills or deaths id has
PHP Code:
new Msg[512];
new ratio = ((g_iKills[id]) / (g_iDeaths[id]));
set_hudmessage(g_Red, g_Green, g_Blue, 0.41, -0.89, 0, _, 0.2, 0.1, 0.1, 1);
format(Msg,511," Level: %i Exp: %i /%i ^n Kills: %i Deaths: %i K/D-Ratio: %.2f", g_iLevel[id], g_iXP[id], required_xp(id), g_iKills[id], g_iDeaths[id], ratio );
ShowSyncHudMsg(id, g_iSync, Msg);
|
PHP Code:
new Float:ratio = float(g_iKills[id]) / float(g_iDeaths[id]);
Quote:
Originally Posted by Artifact
required_xp(id) = required_xp[id]
|
That's not the error.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw
I love you exolent!
|
|
|
|
|