Author Topic: random money  (Read 4881 times)

Offline dcd119

random money
« on: August 09, 2006, 03:19:13 am »
ok I setup the random money to -10 and 500 then I lost 70 credits when I checked it out...

thats ODD!!..

should look into the programming on this..

Max

Offline City Builder

Re: random money
« Reply #1 on: August 12, 2006, 07:50:35 am »
Yeah, we have the same exact problem.  One of our members bought one of the items for random credits and ended up losing 178 credits when the item had been setup to lose a maximum of only -25

The only thing I can tell with my extremely limited knowledge of php is that I believe that the RandomMoney.php script is not taking what we actually typ when setting up the item and using hard coded variables that are in the RandomMoney.php script instead which defaults to -190 and 190.  When I changed those to -25 and 150, then nobodys ever lost more than 25.  But the big problem seems to be 1. what you mentioned.  It would be nice to not have to hard code every random money item I want to put on my forum and 2. The odds of winning seem very very slim.  Out of 25 items that I bought all of them lost credits.

Offline Daniel15

Re: random money
« Reply #2 on: August 12, 2006, 02:27:24 pm »
Geez, I'm stupid! That was a huge error on my part. Please download the latest version of RandomMoney.php to Sources/shop/items, which fixes this problem (please get the file from http://svn.sourceforge.net/viewvc/*checkout*/smfmods/smfshop/trunk/shop/items/RandomMoney.php).

Changes: http://svn.sourceforge.net/viewvc/smfmods/smfshop/trunk/shop/items/RandomMoney.php?r1=3&r2=17

After replacing your current RandomMoney.php file with this one, the values you entered when adding the item should now be working properly :)
« Last Edit: August 12, 2006, 02:29:38 pm by daniel15 »

Offline City Builder

Re: random money
« Reply #3 on: August 12, 2006, 10:22:07 pm »
Thanks for fixing it daniel15  It is much appreciated.

Offline dcd119

Re: random money
« Reply #4 on: August 16, 2006, 11:16:54 pm »
I like to have fun with the people on the forum I have this on...  I was hopin they would win some... but I went through 10,000 credits and lost it all..

Thanks Daniel for the fix.

Offline Daniel15

Re: random money
« Reply #5 on: August 19, 2006, 05:40:33 pm »
Because I moved the SVN repository to my own server, the fixed file is now at http://server.daniel15.com/cgi-bin/viewvc.cgi/smfshop/trunk/shop/items/RandomMoney.php