Raised This Month: $ Target: $400
 0% 

Proper way of getting ratio of teams?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
VMAN
Senior Member
Join Date: Oct 2007
Location: California, US
Old 08-17-2009 , 22:42   Re: Proper way of getting ratio of teams?
Reply With Quote #1

Anyone got a clue what I'm doing wrong?

Here's a better example of how I'm attempting to do it:

PHP Code:
    if(ct != 0) {
        if(
t/ct >= 2) {
            
dosomething();
        }
    } 
My function is not called
VMAN is offline
Xanimos
Veteran Member
Join Date: Apr 2005
Location: Florida
Old 08-17-2009 , 22:54   Re: Proper way of getting ratio of teams?
Reply With Quote #2

Try using 2.0 instead of 2. And also is it possible that you aren't setting your t and ct variables right?

Code:
  new t_count, ct_count, Players[32],pnum; get_players( Players, pnum , "a" ); //only alive players for( new i =0; i < pnum; i++ ) {     switch( get_user_team( Players[i] ) )     {          case 1: {t_count++;}          case 2: {ct_count++;}     } }
Xanimos is offline
Send a message via AIM to Xanimos Send a message via MSN to Xanimos
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:08.


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