Page 1 of 1

API BUG

Posted: Fri Aug 07, 2009 9:03 am
by majianlord
AccountsDecBalance has a &negitvie That should be optional and if you have no &log it seems to be but we use &log alot so i had to recode all the functions in my site to use Negitive=Allow while not an overly big deal figured since it should be optional using &log should not force it to be used.

Thanks kent as allways for a great product.

Re: API BUG

Posted: Fri Aug 07, 2009 9:23 am
by Kent Briggs
majianlord wrote:AccountsDecBalance has a &negitvie That should be optional and if you have no &log it seems to be but we use &log alot so i had to recode all the functions in my site to use Negitive=Allow while not an overly big deal figured since it should be optional using &log should not force it to be used.
The Negative parameter was added in version 2.03 over a year ago:

http://www.briggsoft.com/pmavens_rh.htm

It's needed to let the server know if you want to allow a negative balance to occur. I'll check on the Log issue. That's suppose to work and should have no relation to the Negative parameter.

Re: API BUG

Posted: Fri Aug 07, 2009 11:29 am
by Kent Briggs
Ok, I see what I did. In version 2.50 I fixed a thread safety issue and beefed up the function that decrements player balances. When I rewrote the AccountsDecBalance API function to incorporate the change, I didn't remember that the "Negative" parameter was supposed to be optional and thus it's been mandatory since then. And since you upgraded from 2.48 to 2.62 you're just now seeing that. Also, no log entries are made when a command has an error so that's why you didn't get one. In any case, I'll make that parameter optional again on the next update but in the mean you'll just need to add it to your code. You probably didn't want the default "Allow" option anyway since you don't allow negative balances on your site.

Re: API BUG

Posted: Fri Aug 07, 2009 11:34 am
by majianlord
It acctully varys so now i have 2 functions. 1 For admins cause they can make an account go negitive. Used to catch peoples autodeposits and take any scammed money from them. And 1 for users which should never be allowed to go negitive on there own.

So i like the feature and i am fully using it now but caught me off gaurd is all.