need some logical help
Why the hell when I choose to withdraw 2000 money, and I've already got 15000 on me, the bank balance increases...
iMoney[] is money in bank :) PHP Code:
Before withdraw: http://www.upload.ee/image/1025587/before.jpg After: http://www.upload.ee/image/1025590/after.jpg Also need help with this, because it is not working, like there is menu option other value, when u choose it you get messagemode ... here is the code: PHP Code:
|
Re: need some logical help
Show the full code. I see several flaws in your logic but really need to see the whole code for an appropriate fix IMO.
Food for thought: PHP Code:
|
Re: need some logical help
Um there is nothing new in my full code, the biggest part of my code is menus and their options such as this. Could you just say me the leaks you see :S
If this first code gets fixed I will fix another codes too :S By the way, to check if user already has 16000 money, then I've to check it in the top, right ? Could you say the flaws that you see ? |
Re: need some logical help
Show the full code because I'm sure the source of your logical errors are much larger than the code that you posted.
For the messagemode thing I do need to see the whole code anyways. |
Re: need some logical help
The whole code is very long, other things I've tested, they work... the only thing is bad is withdraw...
PHP Code:
Hope it's enough... |
Re: need some logical help
Here is my version. Try it "as-is" and see how you like it. It should be much easier to modify like this.
PHP Code:
|
Re: need some logical help
Ok thanks, I will try it, And I'm almost sure that this line:
client_print(id, print_chat, "[ BANK ] You have withdrawn $%d.") should be client_print(id, print_chat, "[ BANK ] You have withdrawn $%d.", iAmount) other value still doesn't work, and menu closes sometimes itself I don't want it :S, And is it possible to make that if user has less than 16000 in bank, the 16000 option will be shown in grey. And I like my menu style more, because I think it's easier :S I just want some logical help here: If user has more than 15000 (15001, 15002 etc..), and he choose to withdraw 1000 money, the maximum amount of money is 16000, so how could I make, that he gets maximum, but the rest money goes back to his bank balance. something like that, yeah ? iMoney[id]-= 1000 - (16000 - cs_get_user_money(id)) I've got 15500 on me, 1000 - (16000 - 15500)) = 500. I think I'm right xD |
Re: need some logical help
correct sir.
Quote:
|
Re: need some logical help
Could someone help me ? :S
|
Re: need some logical help
After reading it few times... I still don't get what you want help with. :|
|
| All times are GMT -4. The time now is 01:57. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.