Raised This Month: $ Target: $400
 0% 

error


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Sutar
Senior Member
Join Date: Sep 2010
Old 08-04-2013 , 07:26   error
Reply With Quote #1

Code:
// D:\...\cstrike\addons\amxmodx\scripting\plfunction.sma(89) : warning 213: tag mismatch
Code:
line 88: new hours = g_time/3600;
line 89: g_time = g_time - (floatround(hours, floatround_round)*3600);
what went wrong?
I want to know how the server is already in the network
this function, I get the number of hours

g_time = time start server (in seconds)

Last edited by Sutar; 08-04-2013 at 07:26.
Sutar is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 08-04-2013 , 07:27   Re: error
Reply With Quote #2

hours is not a Float, so there is nothing to round
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
Sutar
Senior Member
Join Date: Sep 2010
Old 08-04-2013 , 07:40   Re: error
Reply With Quote #3

Quote:
Originally Posted by YamiKaitou View Post
hours is not a Float, so there is nothing to round
You probably do not understand,
if the number (for example 39471)
to find out how many days 39471/3600 - the number of seconds in 1 day,
and turns 10.964166666666666666666666666667
here and you want to round up to 10
then we 39471 - (10 * 3600)
that's how me round a number 10.964166666666666666666666666667

Last edited by Sutar; 08-04-2013 at 07:41.
Sutar is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 08-04-2013 , 07:44   Re: error
Reply With Quote #4

There is a difference between Integer and Float division. If all numbers are Integers, then the return value is an Integer. If you want a Float, at least one of the numbers must be a Float
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).

Last edited by YamiKaitou; 08-04-2013 at 07:44.
YamiKaitou is offline
Sutar
Senior Member
Join Date: Sep 2010
Old 08-04-2013 , 07:48   Re: error
Reply With Quote #5

I mean if you just 39471/3600 then I will once 10? or 11?
as it rounds?
Sutar is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 08-04-2013 , 07:49   Re: error
Reply With Quote #6

39471 / 3600 = 10
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
Sutar
Senior Member
Join Date: Sep 2010
Old 08-04-2013 , 08:03   Re: error
Reply With Quote #7

Quote:
Originally Posted by YamiKaitou View Post
39471 / 3600 = 10
Thank you, now everything is working very well.
Sutar 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 15:54.


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