Search
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
» Moving everything to reddit!
Wed Mar 16, 2016 12:51 am by Dunciboy

» Got my driver license!
Sun Mar 06, 2016 6:47 pm by Heist

» When do I get my VIP?
Mon Jan 11, 2016 4:36 pm by Suroks

» Happy new year
Wed Jan 06, 2016 11:31 pm by Hade$ :3

» Admin clean up
Sun Dec 27, 2015 4:02 pm by Dunciboy

» Zombie server updated
Sun Dec 27, 2015 4:00 pm by Dunciboy

» Deathrun Map:mp_Deathrun_water
Sat Dec 26, 2015 9:12 pm by Ali Sajjad

» Searching active admins for zombie server
Sat Dec 19, 2015 11:13 pm by Suroks

» CS:GO Zombie Escape server ready for public
Fri Dec 18, 2015 11:28 pm by Dunciboy


more accuter chronometer

View previous topic View next topic Go down

more accuter chronometer

Post by Matoux on Fri Nov 28, 2014 9:15 am

Is it possible to have a chronometer precise to a hundredth ? It would be great for records since it's quite annoying not to see what time you're exactly doing Smile .

Matoux

Posts : 18
Reputation : 0
Registration date : 2014-09-01
Living place : France

View user profile

Back to top Go down

Re: more accuter chronometer

Post by Badmennie on Fri Nov 28, 2014 2:23 pm

+1
avatar
Badmennie

Posts : 158
Reputation : 4
Registration date : 2014-02-28
Living place : Netherlands

View user profile

Back to top Go down

Re: more accuter chronometer

Post by Matoux on Mon Dec 01, 2014 9:54 pm

I'd like some -1 before giving up.

Matoux

Posts : 18
Reputation : 0
Registration date : 2014-09-01
Living place : France

View user profile

Back to top Go down

Re: more accuter chronometer

Post by Den on Mon Dec 01, 2014 10:49 pm

+1

Den

Posts : 19
Reputation : 2
Registration date : 2014-08-11

View user profile

Back to top Go down

Re: more accuter chronometer

Post by Lenny on Mon Dec 01, 2014 11:15 pm

From what i have heard Call of Duty glitches when the time is not using full numbers. Sad
avatar
Lenny

Posts : 387
Reputation : 21
Registration date : 2013-12-23
Living place : belgium

View user profile

Back to top Go down

Re: more accuter chronometer

Post by Dunciboy on Tue Dec 02, 2014 11:11 am

Script calculations used in an if functions use < > <= >= but these require integers created with int(number). Integers are numbers that don't contain a . or , so 3 would be an integer 3.17 or 3,17 would not be an integer. int() wil change 3,17 and 3.17 to 3 or even crash the server not sure. using 3.17 or 3,17 on an if function containing < > <= >= followed by 3.17 or 3,17 = script failure.

Now the strange thing about this story is that an integer function is supposed to support floating point numbers by separating these numbers in two parts which means they are both handled as separate numbers we call this fake floating point numbers but apparently the call of duty 4 script language doesn't support this and is programmed to convert them. To show you how it works. this basicly how the time is calculated in seconds "time = (getTime() - self.timerStartTime) / 1000;" this was the original function braxi used and caused that no time record where saved due the fact the result was seen as a string by the script language so i changed it to: "time = int((getTime() - self.timerStartTime) / 1000);" The result is what you get on your screen when you finish the map and the numbers are seen as an integer now and the if functions with < > <= >= can now be used without errors. call of duty changed the calculation to an integer and the result is that all the numbers are changed, 133.4 would change to 133.

Normally an int() function should work like explained here.
But by default a floating point cannot exist in computer language.

as stated on the link i gave: 
In the early days of C programming, you often had to link in a special floating-point library if your program used floating-point values. Most compilers now can handle floating-point numbers without this extra step.

And call of duty 4 compiling tool didn't support this yet and the developers made libary for it but instead they programmed it to make all floating point numbers convert to full integers when the int() function is used without float numbers. an other strange thing is that 2 math fuctions exist in the cod 4 script language they are called randomfloat and randomfloatrange. You can sadly not used these float functions to save the record because the numbers need to be compared if there bigger or smaller than the previous record and since these command create random floats. Normally its supposed to be possible but the script language doesn't seem to be able to recognize the float numbers a float() function should have been created but the only ones that exist are the ones i just mentioned and those are random float numbers.

This is what I currently know and how strange the script language works. Even though float script functions exist the if functions react very strange and even crash the server with error sentences like "finishtime is not an integer".
avatar
Dunciboy

Posts : 904
Reputation : 42
Registration date : 2013-06-03

View user profile http://www.sync-gaming.com

Back to top Go down

Re: more accuter chronometer

Post by G0DZ|LLA on Tue Dec 02, 2014 3:51 pm

Dat long text Wink But yeah, it's as true as it can be.

_________________



avatar
G0DZ|LLA

Posts : 811
Reputation : 42
Registration date : 2013-09-30
Living place : COUNTRY OP

View user profile

Back to top Go down

Re: more accuter chronometer

Post by Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum