Weekly Lottery

General Chat, Comments
Post Reply
cyborg
Posts: 38
Joined: Mon Feb 03, 2014 11:09 am

Weekly Lottery

Post by cyborg »

I've recently install the NW Engine and installed the weekly lottery module, when i first login of a day i get the following error:

Code: Select all

Error: Use of undefined constant tickets - assumed 'tickets'
<b style='color: blue;'>HINT:</b> Maybe you forget to put a $ sign before a variable name. If it's a string you want to use, put a single or double quote before and after the string.

Error in <a href='index.php?p=admin_code_editor&f=weekly_lottery%2Fdaily_cron.php&l=3&token=e63f17ae4d71984c4fdc77d086373a8b'>.../modules/weekly_lottery/daily_cron.php</a>
Line 3
Error in ...\libs\hooks.php
Line 41
Error in. ..\modules\cron\auto_pre_content.php
Line 52
Error in ...\libs\hooks.php
Line 41
Error in ...\index.php
Line 291
Mean anything to anyone? Ive got it install on localhost
User avatar
a_bertrand
Posts: 1536
Joined: Mon Feb 25, 2013 1:46 pm

Re: Weekly Lottery

Post by a_bertrand »

It means the module is broken.
I hope the owner of the module can do something for it, in the mean time I will disable it from the market place.

BTW the author / owner of this module is KyleMasacre which is on this forum too.
Creator of Dot World Maker
Mad programmer and annoying composer
cyborg
Posts: 38
Joined: Mon Feb 03, 2014 11:09 am

Re: Weekly Lottery

Post by cyborg »

Okay thank you for the quick reply.

If I disable the module I still get the error, this was originally what I thought the problem was.

EDIT: Thanks I'll drop him a PM later tonight
User avatar
hallsofvallhalla
Site Admin
Posts: 12023
Joined: Wed Apr 22, 2009 11:29 pm

Re: Weekly Lottery

Post by hallsofvallhalla »

it looks as if the error pertains to missing quotes in an array key

for instance

Code: Select all

$MyArray[tickets]
should be

Code: Select all

$MyArray['tickets']
you can check the line of code it is pertaining to and see of if that is the issue.
User avatar
a_bertrand
Posts: 1536
Joined: Mon Feb 25, 2013 1:46 pm

Re: Weekly Lottery

Post by a_bertrand »

You can also simply delete the directory of the module, and your issue should be solved.
Creator of Dot World Maker
Mad programmer and annoying composer
cyborg
Posts: 38
Joined: Mon Feb 03, 2014 11:09 am

Re: Weekly Lottery

Post by cyborg »

Thanks Halls!

I've made the change, I'll see tomorrow is its worked. Is it single quotes? everything else seems to be double or doesn't it matter?

EDIT: I ran crons from the admin, and didnt get an error. Thanks
User avatar
hallsofvallhalla
Site Admin
Posts: 12023
Joined: Wed Apr 22, 2009 11:29 pm

Re: Weekly Lottery

Post by hallsofvallhalla »

inside an array it should be single quotes.
cyborg
Posts: 38
Joined: Mon Feb 03, 2014 11:09 am

Re: Weekly Lottery

Post by cyborg »

I replaced line 3 of "/modules/weekly_lottery/daily_cron.php"

from:

Code: Select all

$tickets = GetUserVariable(tickets);
to

Code: Select all

$tickets = GetUserVariable("tickets");
and it removed the error. Thanks Halls again
User avatar
KyleMassacre
Posts: 573
Joined: Wed Nov 27, 2013 12:42 pm

Re: Weekly Lottery

Post by KyleMassacre »

sorry for the late reply. I have been super busy with school.

Yes their are known issues I went ahead and disabled the module because I'm super busy to really fix it and good thing its free right :p.

The cron only runs on certain days so running it from the admin menu won't change a thing in reality and eventually I do want to get things working for it but untill I get free time I really can't so I am truly sorry
cyborg
Posts: 38
Joined: Mon Feb 03, 2014 11:09 am

Re: Weekly Lottery

Post by cyborg »

Not a problem mate, I know exactly where you're coming from.
Post Reply

Return to “General”