Jump to content
MakeWebGames

Lottery Mod


Recommended Posts

Ok this should work and this is the last time I am posting a full script for you, you really need to learn yourself or you will get nowhere:

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

Still not updating anything or sending event..

And what do you mean by this?

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

Link to comment
Share on other sites

  • Replies 65
  • Created
  • Last Reply

Top Posters In This Topic

the raven script is bound to have multiple problems, the only way for him to actually find the error is to start with bit by bit of the cron script such a simple INSERT query, evidently that did not happen because the error threw that the query function was not present this function should be in his class folder, under which ever he set his database to mysqli or mysql when installing the engine.... So he needs to find the query() function and post that, if it is in that file. I think though he needs to open up his own thread so this one don't get over plowed by his Raven script errors lol.

Link to comment
Share on other sites

the raven script is bound to have multiple problems, the only way for him to actually find the error is to start with bit by bit of the cron script such a simple INSERT query, evidently that did not happen because the error threw that the query function was not present this function should be in his class folder, under which ever he set his database to mysqli or mysql when installing the engine.... So he needs to find the query() function and post that, if it is in that file. I think though he needs to open up his own thread so this one don't get over plowed by his Raven script errors lol.

I'm not sure if he would even know what you're talking about to be honest, no harm to him. He just wont do the work to learn what's going on.

Link to comment
Share on other sites

thats good seems it need single quote ' around the query

Not to burst your bubble haha but that's not the problem. The problem was his hierarchy of where his functions, includes, and objects were placed in the script. Not to mention aade up function name called mysql_escape(). He placed the event_add function at the very top using the global variable/object $db which wasn't defined yet, and all he needed to do was include global_func.php.

The quotes in the queries you place are to kind of inform MySQL that it's a string but the columns are casted as ints which MySQL will convert those to an int anyway.

What [MENTION=68406]-BRAIDZ-[/MENTION] needs to understand is that you can use a variable without creating it. Doing that is like going to a country club you are not a member of. event_add(), and $db were trying to show up before being on the guest list

Link to comment
Share on other sites

is there a single person cut off ???? what i mean is 1 person could play the game on their own and reap rewards

That's a good idea. There are a couple ways I can think of to battle that. Maybe use some stuff for my NWE lotto found here: https://github.com/KyleMassacre/Weekly-Lotto to expand on it. Some notable things I did is:

For starters to try to eliminate certain people from reaping all the wins is I took a percentage of the money spent on tickets and added to the game. This way if it's a single player just playing they will lose money. I also added a revolving lottery. What that is, is a lottery where one week someone may not win and the pot just stays the same. So if the pot is at 1,000 and no one wins then the pot stays at 1,000 the next week and adds as more people play. I also added a recent winners table which brings me to my other idea on how to prevent the same player from winning. You can search the recent players and return say... 4 rows:

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

And just make sure their userid is not in the array

Link to comment
Share on other sites

  • 7 months later...
  • 3 weeks later...
My Evil Doing - Critical Error

A critical error has occurred, and this page cannot be displayed. Please try again later.

Query failed

 

i keep getting this error every time i try to update the ticket price and max lotto tickets

 

my bad change

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

to

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

Link to comment
Share on other sites

Little update for this.

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

then add this function into global_funcs.php or in the cron file up to you.

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

then open up the cron file and look for

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

and below this line add

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

Edited by NonStopCoding
Link to comment
Share on other sites

  • 2 months later...
  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...