This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

something wrong when calculating float and any.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
LinLinLin
Senior Member
Join Date: Sep 2021
Old 12-13-2023 , 22:12   something wrong when calculating float and any.
Reply With Quote #1

code below
PHP Code:
{
        
// g_list_infectedbottime is a ArrayList

        // wrong result, it is always 0 and always do continue.
        
if( GetEngineTime() - g_list_infectedbottime.Get(i2) < respawntime )
            continue;

        
// correct result, it is the actually the time remain.
        
float time g_list_infectedbottime.Get(i2);
        if( 
GetEngineTime() - time respawntime )
            continue;

I am sure that what i stored in the ArrayList block 2 is a float.
I have no idea why this happen.
LinLinLin is offline
101
Member
Join Date: Nov 2023
Old 12-14-2023 , 03:57   Re: something wrong when calculating float and any.
Reply With Quote #2

https://wiki.alliedmods.net/SourcePa...Syntax#View_As
101 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 05:09.


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