Raised This Month: $ Target: $400
 0% 

Dividing Arrays and comparing


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
xiiph
Junior Member
Join Date: Mar 2005
Old 04-23-2005 , 18:42   Dividing Arrays and comparing
Reply With Quote #1

Okay I want it to do this:

option[] is defined by what keys ppl press when voting.

Code:
new option[2]

if ((option[0] / option[1]) > 0.65) {
      do_this()
}
I cant get this to work, its probably a silly beginner mistake, but plz help anyway.
xiiph is offline
karlos
Veteran Member
Join Date: Apr 2004
Location: Germany/Poland
Old 04-23-2005 , 19:31  
Reply With Quote #2

make sure that "option[1]" is not ZERO
__________________
alias White Panther
karlos is offline
xiiph
Junior Member
Join Date: Mar 2005
Old 04-24-2005 , 08:37  
Reply With Quote #3

Thanks tons, will try it
xiiph is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 04-24-2005 , 13:13  
Reply With Quote #4

You declared option as an integer but check it for a float result? Are you sure that'll work?
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
xiiph
Junior Member
Join Date: Mar 2005
Old 04-29-2005 , 00:57  
Reply With Quote #5

Hmm I donno, but it works

Thank you
xiiph is offline
Twilight Suzuka
bad
Join Date: Jul 2004
Location: CS lab
Old 04-29-2005 , 13:01  
Reply With Quote #6

Well, I doubt it if it will work as intended, but it might, as all values in SMALL are really 32 bits. There is no real float or int, they are just tags.
__________________
Twilight Suzuka is offline
Send a message via AIM to Twilight Suzuka Send a message via MSN to Twilight Suzuka
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 09:59.


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