Voting bug

Ask Page...

Moderators: JettJackson, Infinity, Page

Post Reply
Infinity
Newbie Spam Artist
Posts: 998
Joined: Thu Feb 09, 2006 10:14 pm

Voting bug

Post by Infinity »

On new.smrealms.de

Something happens with AJAX, back button error appears and it's possible to vote at least at one of the sites twice, if not on more.

Also, I believe that something with the time is wrong, cause I get to vote too often.
Use The Force(s)!
Page
SMR Coder
Posts: 1779
Joined: Sat Dec 07, 2002 9:17 pm

Re: Voting bug

Post by Page »

Do you definitely get the turns both times? Because the script for giving the turns is the same one that registers the vote so it *should* be all or nothing.

I'll look at the timing, but I think it may just be a case of resetting at midnight which means you can vote twice in fairly short sucession if you choose.
Page
SMR Coder
Posts: 1779
Joined: Sat Dec 07, 2002 9:17 pm

Re: Voting bug

Post by Page »

I did check through, the voting may not be all or nothing, but if only part of it works it'll be that the vote is registered but no turns are given.
Also the timer appeared to be set to the time vote is made and checked that it's been 24h since the last vote, but there could be a problem elsewhere so still need to look closer at this possibility
Page
SMR Coder
Posts: 1779
Joined: Sat Dec 07, 2002 9:17 pm

Re: Voting bug

Post by Page »

The timing stuff all *looks* ok, and there's not much to it really, set to current time when processing the vote, check if last vote was > 86400s ago
Post Reply