Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Bandit

Pages: [1]
1
Modifications / Re: SMF Lottery Mod
« on: January 04, 2008, 01:11:52 pm »
I haven't been able to get the cron job to run. The lottery center indicates no draws have taken place yet. I have the crom job set to run every Thursday at 11:30 PM, and I've edited the LotteryDraw.php file to allow for a period of 7 days between draws. It just doesn't run. When I try to access the file with my browser to run it that way I get an internal server error. I have the interest for the bank working, and I've made sure the path is the same for both jobs. I really don't know much at all about cron jobs, so I'm at a loss. I even tried chmod 777 on the lotterydraw file. Can anyone give me any ideas? I love this mod and my users are buying up tickets left and right, but I've got to get the draw working.

Thanks in advance for any help anyone can offer.

UPDATE: I got it to work by choosing every weekday instead of a specific day of the week, and changing the time between draws to 24 hours. I don't want a daily draw, though, I only want a weekly draw. And I don't even care what day of the week it happens on, just that it only happens once a week. If I leave it at every weekday, and change the time between draws to 7 days, will that allow it to run weekly?

UPDATE #2: Now that the lottery draw has run once, none of my regular members can use their tickets. They are able to buy them fine, they go into their inventory and choose their numbers but when they click to use the item, they get this:

Quote
"Database Error Please try again. If you come back to this error screen, report the error to an administrator."

When I look in the forum's error log, this is the error that shows up:

Code: [Select]
test   Today at 08:54:23 PM 

 74.77.24.187     8ffbf09aa0698d68c39dfa13e9636742 

 http://www.lacrosse-network.com/forum/index.php?option=com_smf&Itemid=26&action=shop;do=inv3;id=199 

Database Error: Incorrect table name ''
File: /home/xxxxxx/public_html/lacrosse-network/forum/Sources/shop/items/Lottery.php
Line: 115   


Here is line 113-117 of my lottery.php file:

Code: [Select]
$result = db_query("SELECT `MemberTicketID` FROM `{$db_prefix}shop_lottery` WHERE
        `ID_MEMBER` = '$ID_MEMBER' AND
        `ID_TICKET` > $lastTicket",__FILE__,__LINE__);
        if (mysql_num_rows($result) == $item_info[1])
        {

I don't get any errors using my admin account, I am able to use the tickets without issue. I'm lost. I can't figure out why the table name would be incorrect for one user group and not another. I haven't changed anything in any of the files except the time between draws. Using SMF 1.1.4, shop 3.0 (build 12) and lottery mod 1.0.1. Any ideas?

Bandit

2
Items / Re: New items: Red Balls
« on: December 31, 2007, 01:41:56 pm »
That's exactly what I mean. If the recipient lost credits, it should say he lost XX credits. If he gained credits, then it should say he gained XX credits. The message I get after I throw the ball should say that as well as the PM the recipient gets should also tell them whether they won or lost.

3
Items / Re: An idea of Item Redball
« on: December 30, 2007, 11:03:56 am »
Redball2 does sent a PM but only to the one you threw it to, if I sent the ball to some one i don't know what it did, of the receiver of theball, and that's annoying

so if I throw a ball at my victim, I too want to know if I win or lose... how can this be done ?

FIND:
Code: [Select]
return "You've thrown the ball to {$_POST['stealfrom']} if he catches it he'll gain money, else he'll lose it!!!";
REPLACE WITH
Code: [Select]
return "You've thrown the ball to {$_POST['stealfrom']} he gain/lost ".formatMoney($amount)." credit!!!";


And you know what would be really nice? is if when the ball is thrown to someone, a PM well be send, BUT there is a xx second wait, and if the person reply the PM with in the xx second wait, he catchs the ball, he gain money and the ball. if he dosn't, he loses money and no one get the ball.

Think that could be done?

I used this code in my site, and it works great, but is there a way for it to say whether the credits were gained or lost instead of "...gained/lost xxx credits"? It tells me the number of credits, but it doesn't say whether or not the credits were given to the recipient or taken from them.

Pages: [1]