Raised This Month: $ Target: $400
 0% 

[AMXX] Run time error 11: divide


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
striker07
Veteran Member
Join Date: Mar 2012
Location: Solar System/Earth/Belgi
Old 07-13-2012 , 18:44   [AMXX] Run time error 11: divide
Reply With Quote #1

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_Redg_Greeng_Blue0.41, -0.890_0.20.10.11);
 
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(idg_iSyncMsg); 
__________________

Working on:
[CSGO/CSS] Mmorpg - an extensive XP/level modulair platform
Progress: [♣♣♣♣♣♣♣|♣♣♣]

Last edited by striker07; 07-13-2012 at 18:45.
striker07 is offline
Old 07-13-2012, 18:56
Artifact
This message has been deleted by Artifact. Reason: Spam
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 07-13-2012 , 18:58   Re: [AMXX] Run time error 11: divide
Reply With Quote #2

Quote:
Originally Posted by striker07 View Post
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_Redg_Greeng_Blue0.41, -0.890_0.20.10.11);
 
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(idg_iSyncMsg); 
PHP Code:
new Float:ratio float(g_iKills[id]) / float(g_iDeaths[id]); 
Quote:
Originally Posted by Artifact View Post
required_xp(id) = required_xp[id]
That's not the error.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
striker07
Veteran Member
Join Date: Mar 2012
Location: Solar System/Earth/Belgi
Old 07-13-2012 , 19:39   Re: [AMXX] Run time error 11: divide
Reply With Quote #3

nice, thanks exolent.
it's working perfectly now
__________________

Working on:
[CSGO/CSS] Mmorpg - an extensive XP/level modulair platform
Progress: [♣♣♣♣♣♣♣|♣♣♣]
striker07 is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 15:23.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode