Fractal Softworks Forum

Starsector => Bug Reports & Support => Topic started by: LazyWizard on August 18, 2012, 03:07:02 PM

Title: CampaignClockAPI.getElapsedDaysSince() only returns whole numbers
Post by: LazyWizard on August 18, 2012, 03:07:02 PM
Pretty much self-explanatory. CampaignClockAPI's getElapsedDaysSince(time) returns a float, but for some reason it's only ever a whole number (as in it jumps directly from 118.0 to 119.0).

Is it supposed to be accurate to less than a day, or should this method return an int instead?
Title: Re: CampaignClockAPI.getElapsedDaysSince() only returns whole numbers
Post by: RoseLinda on August 20, 2012, 04:49:59 AM
According to me this should return an int,well if still you not able to fix you problem better Google it,well if it jumps from 118.0 to 119.0 then whats wrong with this,don't you think Answer is correct.
<link removed>
Title: Re: CampaignClockAPI.getElapsedDaysSince() only returns whole numbers
Post by: Upgradecap on August 20, 2012, 05:06:47 AM
According to me this should return an int,well if still you not able to fix you problem better Google it,well if it jumps from 118.0 to 119.0 then whats wrong with this,don't you think Answer is correct.
<link removed> -- SeaBee

Whatisthisidon'teven.jpg

I'm confused. A somewhat legit answer mixed with an ad, hmmm...
Title: Re: CampaignClockAPI.getElapsedDaysSince() only returns whole numbers
Post by: arcibalde on August 20, 2012, 05:13:37 AM
Bots get smarter and smarter!
Title: Re: CampaignClockAPI.getElapsedDaysSince() only returns whole numbers
Post by: Faiter119 on August 20, 2012, 05:15:23 AM
According to me this should return an int,well if still you not able to fix you problem better Google it,well if it jumps from 118.0 to 119.0 then whats wrong with this,don't you think Answer is correct.
<link removed> -- SeaBee

Dafuq? What is the deal with that ad?
Title: Re: CampaignClockAPI.getElapsedDaysSince() only returns whole numbers
Post by: Upgradecap on August 20, 2012, 05:20:06 AM

Well, considering the user who posted that ad (or bot?) went offline precisely 11 minutes and 6 seconds after registering, i can probably say that it is an bot. Goddamn them all.



According to me this should return an int,well if still you not able to fix you problem better Google it,well if it jumps from 118.0 to 119.0 then whats wrong with this,don't you think Answer is correct.

Alot of spelling errors too, for example i have bolted those parts out.

1st bolt: He states that according to him, it should return a int. This may or may not be true, as i have not alot of experience in this field.

2nd bolt: He says that if LW still can't fix his problems, he should google it, denying that his answer of it returning an int is correct.

3rd bolt: He asks what the problem is with it jumping from 118 to 119 is, despite LW clearly stating his problems and issues.

4th bolt: He says: "don't you think answer is correct." well, his only answer was to say that he should google his problem.

based on that evidence and fact, i can only presume it is an bot.
Title: Re: CampaignClockAPI.getElapsedDaysSince() only returns whole numbers
Post by: Faiter119 on August 20, 2012, 05:27:12 AM
Forum needs some security against those. But I guess banning them kinda helps.
Title: Re: CampaignClockAPI.getElapsedDaysSince() only returns whole numbers
Post by: Upgradecap on August 20, 2012, 05:30:20 AM
Forum needs some security against those. But I guess banning them kinda helps.

Range ban on them, perhaps?
Title: Re: CampaignClockAPI.getElapsedDaysSince() only returns whole numbers
Post by: Faiter119 on August 20, 2012, 05:33:03 AM
Forum needs some security against those. But I guess banning them kinda helps.

Range ban on them, perhaps?

Bots like that usually gets banned and gets their posts removed within a short timespan. Not sure how to prevent bots, maybe a recaptcha or something at the registration.
Title: Re: CampaignClockAPI.getElapsedDaysSince() only returns whole numbers
Post by: Alex on August 20, 2012, 07:55:47 AM
Pretty much self-explanatory. CampaignClockAPI's getElapsedDaysSince(time) returns a float, but for some reason it's only ever a whole number (as in it jumps directly from 118.0 to 119.0).

Is it supposed to be accurate to less than a day, or should this method return an int instead?

Should be more accurate - forgot a few casts in there. Thanks for reporting it - fixed.