Jump to content
MakeWebGames

Need some help


rfw2003

Recommended Posts

O.k. I am trying to code up a mod. I'm working on a lottery style Mod for a friend.

I have it to the point that I can input the numbers into the DB, and a script that will randomly generate the numbers.

I have been successful in compareing the numbers in the DB to the generated numbers to see if all numbers match, and if they do peform a my function.

Where I'm having trouble is figureing out how to see if only 3,4 or 5 of the numbers match the generated numbers.

Can anyone help with this????

R.F.

Link to comment
Share on other sites

Re: Need some help

Can't you just do a simple while loop with a counter. It loops through the numbers they chose and compares it to the array of winning numbers. It counts how many times there is a match and the reward is based on that counter.

Link to comment
Share on other sites

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...