I'm coding this for v4 first, which means yes, I would need to edit the index (
http://www.staredit.net/index.php?act=stocks )
Either way, if it doesn't go with the member's data, I still need somewhere to store the data. So, STOCKS ARE ON HOLD.
But, on a side note, I'm going to start with a smaller project first.
Just a simply lottery, let me explain.
The jackpot starts at 200 minerals and one ticket costs 10 minerals. Purchasing a ticket adds that much to the jackpot. With a ticket, you pick a number from 1-999 (or possibly 9999). If you hit the number, you get the 500 minerals. If you are within +/- 50 minerals of the number, you get a percentage of the jackpot based on how far your number was.
Let me use an example for that.
The number is 300, you picked 270.... 300-270 = 30, 30% of the money.
The number is 974, you picked 988.... 974-988 = -14, absolute value(-14)= 14, 14% of the money.
The only limits are, one ticket per person per drawing. And, if the jackpot falls below 200, it gets pushed back up to 200. I'd probably have it do a drawing every 6, 8, 12, or 24 hours. Tell me what you think of that idea. Its a lot simpler, and I think I'm better off starting with something smaller.
[right][snapback]229636[/snapback][/right]
Your calculus are wrong because if the number is 300 and you picked 299 you'll get 300-299 = 1% of the money, but if you picked 200 you would get 300-200 = 100% of the money!
You would have to check for negative percents if the picked number is too far from the right number, like if the number is 1 and the user picked 300:
IP: To test PHP files do I have to upload them or can I execute them somehow on my computer?