Raised This Month: $ Target: $400
 0% 

if condition for comparing indexed array to number


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Owyn
Veteran Member
Join Date: Nov 2007
Old 02-11-2009 , 14:03   Re: if condition for comparing indexed array to number
Reply With Quote #3

Code:
public client_connect(id)
{
     new rate[32]
     get_user_info(id, "rate", rate, 31)
     new rate2 = str_to_num( rate[31] );

     if ( rate[31] > 1 )
     {
     new name[32];
     get_user_name(id, name, 31);
     
     server_cmd("amx_chat ^"%s^"s rate is %s",name,rate);
     }

}
aslo, str_to_num doesn't work )= if i retrieve rate2 its data with %s i get get blank answer and with %d i get zero 0, rate (rate[32) returns fine with %s

Last edited by Owyn; 02-11-2009 at 14:05.
Owyn is offline
Send a message via ICQ to Owyn
 



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 16:53.


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