de en es fr
Let the machine help
Light teasing, exhibition, BDSM, sissyfication, watersports... with sounds and pictures


Post new topic Reply to topic  [ 2 posts ] 
Author Message
 mailtimer.php random bug and fix
PostPosted: Fri Oct 02, 2015 7:37 am 
Offline
Newcomer
It appears that there may be a bug in mailtimer.php

ss.deviatenow.com/mailtimer.php

I noticed that the random function wasn't sending even when waiting 10 minutes. Upon debugging it appears the problem is the line:

$("#timer").val(parseInt(60 * (1+Math.random()*10)))

I believe the parseInt function isn't generating the integer as planned. I believe a better line would be:

$("#timer").val(Math.round(60 * (Math.random()*10)))

This leaves the range open from 0 seconds to about 600 seconds.

It might also be interesting to add some other randomness options. Is there a preferred way to submit code enhancements?


Top
 Profile Send private message 
 
 Re: mailtimer.php random bug and fix
PostPosted: Thu Jan 07, 2016 7:35 pm 
Offline
Site Admin
User avatar
Thank you, I changed, both codes should be ok, you probably encountered another code problem than that.

There is no features requests area.


Top
 Profile Send private message 
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  


Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Maroon Fusion theme created by Oxydo
Software, theme modifications, phpBB modification by Doti 2010 - 2020
This website uses session cookies only.