View Single Post
Old 03-01-2007, 10:39 AM   #20 (permalink)
FingersMcSteal
Forum Expert
 
FingersMcSteal's Avatar
 
Join Date: Mar 2006
Location: North East, England, UK
Age: 42
Posts: 1,151
Send a message via ICQ to FingersMcSteal Send a message via MSN to FingersMcSteal
Arrow

The ticket number checking doesn't work right, i'll have to have another look at this later today.

I'll post once i get it fixed tho, and... sorry again to anyone using it, it's just made a few players happy on my shard but they can keep the gold

i've remarked the section of code i need to have a look at but it's this part in the timer code...

Code:
// Still to add ticket status checking
                                if (thisticket.TicketStatus == "Valid Ticket")
                                {
                                    // **********************************
                                    // **********************************
                                    // *** THE IDIOT FIX GOES HERE :) ***
                                    // **********************************
                                    // **********************************

                                    // CHECK 1ST TICKET DIGIT FOR A MATCH AGAINST THE DRAWN NUMBERS
                                    if (thisticket.LotteryNumber1Ticket == winnumber1 | thisticket.LotteryNumber1Ticket == winnumber2 | thisticket.LotteryNumber1Ticket == winnumber3 | thisticket.LotteryNumber1Ticket == winnumber4 | thisticket.LotteryNumber1Ticket == winnumber5)
                                    {
                                        ticketmatches++;
                                    }
                                    // CHECK 2ND TICKET DIGIT FOR A MATCH AGAINST THE DRAWN NUMBERS
                                    if (thisticket.LotteryNumber2Ticket == winnumber1 | thisticket.LotteryNumber2Ticket == winnumber2 | thisticket.LotteryNumber2Ticket == winnumber3 | thisticket.LotteryNumber2Ticket == winnumber4 | thisticket.LotteryNumber2Ticket == winnumber5)
                                    {
                                        ticketmatches++;
                                    }
                                    // CHECK 3RD TICKET DIGIT FOR A MATCH AGAINST THE DRAWN NUMBERS
                                    if (thisticket.LotteryNumber3Ticket == winnumber1 | thisticket.LotteryNumber3Ticket == winnumber2 | thisticket.LotteryNumber3Ticket == winnumber3 | thisticket.LotteryNumber3Ticket == winnumber4 | thisticket.LotteryNumber3Ticket == winnumber5)
                                    {
                                        ticketmatches++;
                                    }
                                    // CHECK 4TH TICKET DIGIT FOR A MATCH AGAINST THE DRAWN NUMBERS
                                    if (thisticket.LotteryNumber4Ticket == winnumber1 | thisticket.LotteryNumber4Ticket == winnumber2 | thisticket.LotteryNumber4Ticket == winnumber3 | thisticket.LotteryNumber4Ticket == winnumber4 | thisticket.LotteryNumber4Ticket == winnumber5)
                                    {
                                        ticketmatches++;
                                    }
                                    // CHECK 5TH TICKET DIGIT FOR A MATCH AGAINST THE DRAWN NUMBERS
                                    if (thisticket.LotteryNumber5Ticket == winnumber1 | thisticket.LotteryNumber5Ticket == winnumber2 | thisticket.LotteryNumber5Ticket == winnumber3 | thisticket.LotteryNumber5Ticket == winnumber4 | thisticket.LotteryNumber5Ticket == winnumber5)
                                    {
                                        ticketmatches++;
                                    }

                                    // *******************************
                                    // *******************************
                                    // *** END OF THE IDIOT FIX :) ***
                                    // *******************************
                                    // *******************************

                                    if (ticketmatches == 0)
                                    {
                                        thisticket.TicketStatus = "Void / Old Ticket";
                                    }
                                    if (ticketmatches == 1)
                                    {
                                        onenumberwinners++;
                                        thisticket.TicketStatus = "1 Matched Number";
                                    }
                                    if (ticketmatches == 2)
                                    {
                                        twonumberwinners++;
                                        thisticket.TicketStatus = "2 Matched Numbers";
                                    }
                                    if (ticketmatches == 3)
                                    {
                                        threenumberwinners++;
                                        thisticket.TicketStatus = "3 Matched Numbers";
                                    }
                                    if (ticketmatches == 4)
                                    {
                                        fournumberwinners++;
                                        thisticket.TicketStatus = "4 Matched Numbers";
                                    }
                                    if (ticketmatches == 5)
                                    {
                                        fivenumberwinners++;
                                        thisticket.TicketStatus = "5 Matched Numbers";
                                    }
                                }
                                ticketmatches = 0;

                                // Void all old tickets
                                if (thisticket.TicketStatus == "1 Matched Number" && thisticket.DateOfDrawOnTickets != thislotterystone.DateOfNextDraw)
                                {
                                    thisticket.TicketStatus = "Void / Old Ticket";
                                }
                                if (thisticket.TicketStatus == "2 Matched Numbers" && thisticket.DateOfDrawOnTickets != thislotterystone.DateOfNextDraw)
                                {
                                    thisticket.TicketStatus = "Void / Old Ticket";
                                }
                                if (thisticket.TicketStatus == "3 Matched Numbers" && thisticket.DateOfDrawOnTickets != thislotterystone.DateOfNextDraw)
                                {
                                    thisticket.TicketStatus = "Void / Old Ticket";
                                }
                                if (thisticket.TicketStatus == "4 Matched Numbers" && thisticket.DateOfDrawOnTickets != thislotterystone.DateOfNextDraw)
                                {
                                    thisticket.TicketStatus = "Void / Old Ticket";
                                }
                                if (thisticket.TicketStatus == "5 Matched Numbers" && thisticket.DateOfDrawOnTickets != thislotterystone.DateOfNextDraw)
                                {
                                    thisticket.TicketStatus = "Void / Old Ticket";
                                }
                            }
I'll have to figure a solution to it and make it check the right way, didn't realise until i triggered a lottery on my shard lastnight.
FingersMcSteal is offline   Reply With Quote