Raised This Month: $ Target: $400
 0% 

Problem with Float in checking its figures


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 11-08-2019 , 14:09   Re: Problem with Float in checking its figures
Reply With Quote #3

Quote:
Originally Posted by OciXCrom View Post
"=" is for assigning a value.
"==" is for comparing/checking.

So using "=" with "if" is invalid.
Actually it is valid.
PHP Code:
if((5)) 
will assign 5 to a and return 5. Of course, this is not how you would want "if" to behave in most cases and most likely not what OP intended.

A case where this is useful(read as "works as you want") is:
PHP Code:
new target = -1
while((target find_ent_by_class(target"something")) 
__________________

Last edited by HamletEagle; 11-08-2019 at 14:11.
HamletEagle is offline
 



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 02:46.


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