Main Menu
  • Welcome to The RPG Maker Resource Kit.

Help with bank [RESOLVED]

Started by XtheExecutioner, March 18, 2007, 03:00:42 AM

0 Members and 1 Guest are viewing this topic.

XtheExecutioner

ok i followed the Tut made for creating a bank and i've run into a few problems. I have RPGMXP PK. WHen i go talk to the guy i am using for the bank it says "balance: 5 gold, Gold on hand:0" then when i try to withdraw or deposit it does nothing it just says" you withdraw/deposit 0 gold"  I followed everything and checked it all twice. here is what i put in so some one please tell me what i did wrong. I know i didn't put in the ": cancel handler" but i don't know how.

EDIT: i just messed with it and everything works now just when i go to the guy it still says i have 5gold in the bank and 0 on hand. And when i with draw or deposit it still says "you deposit 0 gold, you now have a balance of 5 gold" and for withdrawing it says"you withdraw 0 gold, you have 0 gold on hand"


<>Variable: [003: Gold held] = Money
<>Message: Balance: \c[3]\v[3]\c[0]
:          :gold on hand:\c[3]\v[1]\c[0]
<>Show choices:Deposit,Withdraw,Do nothing
[deposit]handler
<>Conditional Branch:variable [003:gold held]==0
<>Message: You don't have any gold to deposit.
<>
: Else handler
<>Show Choices:Fixed Amount, Custom
[Fixed Amount]handler
<>Message: How much of \c[3]\v[1]\c[0] gold?
<>Show Choices:1000,10000,100000,All
[1000]handler
<>Variable: [004:Deposit]=1000
<>Conditional branch: Variable [004:Deposit]>variable[003:gold held]
<>Message: Not enough gold on hand.
<>
Else handler
<>Message: You deposit \c[3]\v[2]\c[0] gold
<>Variable: [005:bank]+= variable[004:deposit]
<>Change money: - variable: [004:Deposit]
<>Variable: [004:deposit]-=variable: [004:deposit]
<>Message: You now have a balance of \c[3]\v[3]\c[0]
<>
End
<>
[10000]handler
<>Variable: [004:Deposit]+=1000
<>Conditional branch: Variable [004:Deposit]>variable[003:gold held]
<>Message: Not enough gold on hand.
<>
Else handler
<>Message: You deposit \c[3]\v[2]\c[0] gold
<>Variable: [005:bank]+= variable[004:deposit]
<>Change money: - variable: [004:Deposit]
<>Variable: [004:deposit]-=variable: [004:deposit]
<>Message: You now have a balance of \c[3]\v[3]\c[0]
<>
End
<>
[100000]handler
<>Variable: [004:Deposit]+=100000
<>Conditional branch: Variable [004:Deposit]>variable[003:gold held]
<>Message: Not enough gold on hand.
<>
Else handler
<>Message: You deposit \c[3]\v[2]\c[0] gold
<>Variable: [005:bank]+= variable[004:deposit]
<>Change money: - variable: [004:Deposit]
<>Variable: [004:deposit]-=variable: [004:deposit]
<>Message: You now have a balance of \c[3]\v[3]\c[0]
<>
End
<>
[All]handler
<>Variable: [004:deposit]+= Variable: [003:gold held]
<>Conditional branch: Variable [004:Deposit]>variable[003:gold held]
<>Message: Not enough gold on hand.
<>
Else handler
<>Message: You deposit \c[3]\v[2]\c[0] gold
<>Variable: [005:bank]+= variable[004:deposit]
<>Change money: - variable: [004:Deposit]
<>Variable: [004:deposit]-=variable: [004:deposit]
<>Message: You now have a balance of \c[3]\v[3]\c[0]
<>
End
<>
End
<>
[Custom]handler
<>Message:Deposit how much of \c[3]\v[1]\c[0] gold?
Input number: [004:deposit]. 6 digits
<><>Conditional branch: Variable [004:Deposit]>variable[003:gold held]
<>Message: Not enough gold on hand.
<>
Else handler
<>Message: You deposit \c[3]\v[2]\c[0] gold
<>Variable: [005:bank]+= variable[004:deposit]
<>Change money: - variable: [004:Deposit]
<>Variable: [004:deposit]-=variable: [004:deposit]
<>Message: You now have a balance of \c[3]\v[3]\c[0]
<>
End
<>
End
<>
End
<>
[Withdraw] handler
<>Conditional branch: variable [005:bank]==0
<>Message: No money to withdraw
<>
Else handler
<>Show Choices: Fixed amount,Custom
[Fixed Amount]handler
<>Message: How much of \c[3]\v[1]\c[0] gold?
<>Show Choices:1000,10000,100000,All
[1000]handler
<>Variable: [006:Withdraw]=1000
<>Conditional branch: Variable [006:withdraw]>variable[005:bank]
<>Message: Not enough gold to withdraw
<>
Else handler
<>Message: You deposit \c[3]\v[4]\c[0] gold
<>Variable: [005:bank]-= variable[006:withdraw]
<>Change money: - variable: [006:withdraw]
<>Variable: [006:withdraw]-=variable: [006:withdraw]
<>Variable: [003: gold held]=money
<>Message: You now have a balance of \c[3]\v[1]\c[0]gold.
<>
End
<>
[10000]handler
<>Variable: [006:withdraw]+=1000
<>Conditional branch: Variable [006:withdraw]>variable[005:bank]
<>Message: Not enough gold to withdraw
<>
Else handler
<>Message: You deposit \c[3]\v[4]\c[0] gold
<>Variable: [005:bank]-= variable[006:withdraw]
<>Change money: - variable: [006:withdraw]
<>Variable: [006:withdraw]-=variable: [006:withdraw]
<>Variable: [003: gold held]=money
<>Message: You now have a balance of \c[3]\v[1]\c[0]
<>
End
<>
[100000]handler
<>Variable: [006:Withdraw]+=100000
<>Conditional branch: Variable [006:withdraw]>variable[005:bank]
<>Message: Not enough gold to withdraw
<>
Else handler
<>Message: You deposit \c[3]\v[4]\c[0] gold
<>Variable: [005:bank]-= variable[006:withdraw]
<>Change money: - variable: [006:withdraw]
<>Variable: [006:withdraw]-=variable: [006:withdraw]
<>Variable: [003: gold held]=money
<>Message: You now have a balance of \c[3]\v[1]\c[0]gold.
<>
End
<>
[all]handler
<>Variable: [006:withdraw]+= Variable: [005:bank]
<>Conditional branch: Variable [006:withdraw]>variable[005:bank]
<>Message: Not enough to withdraw
<>
Else handler
<>Message: You deposit \c[3]\v[4]\c[0] gold
<>Variable: [005:bank]-= variable[006:withdraw]
<>Change money: - variable: [006:withdraw]
<>Variable: [006:withdraw]-=variable: [006:withdraw]
<>Variable: [003: gold held]=money
<>Message: You now have a balance of \c[3]\v[1]\c[0]
<>
End
<>
End
<>
[Custom]Handler
<>Message:Withdraw how much of \c[3]\v[3]\c[0] gold?
Input number: [006:Withdraw]. 6 digits
<><>Conditional branch: Variable [006:withdraw]>variable[005:bank]
<>Message: Not enough gold to withdraw
<>
Else handler
<>Message: You deposit \c[3]\v[4]\c[0] gold
<>Variable: [005:bank]-= variable[006:withdraw]
<>Change money: + variable: [004:Deposit]
<>Variable: [006:withdraw]-=variable: [006:withdraw]
<>Variable: [003:gold held]= Money
<>Message: You now have a balance of \c[3]\v[1]\c[0]
<>
End
<>
End
<>
End
[Do nothing] handler
<>Message:If you wish
<>
End
<>



Also i know i didn't put another 0 with the numbers in the variables i just noticed and it not that big a deal so yea.
OF HELLS DESIGN. IMPOSSIBLE IS NOTHING!

modern algebra

I'm not exactly sure what tut you are referring to, but one thing I notice immediately is that your "gold on hand" is displaying the wrong variable. Variable 3 is the one that shows how much gold you have on hand, not variable 1. So for your first message, instead of:

<>Message: Balance: \c[3]\v[3]\c[0]
:          :gold on hand:\c[3]\v[1]\c[0]

it should be

<>Message: Balance: \c[3]\v[5]\c[0]
:          :gold on hand:\c[3]\v[3]\c[0]

From quickly looking through your event, I think variable 5 is the one that is keeping track of your balance, not 1, as:

<>Message: You deposit \c[3]\v[2]\c[0] gold
<>Variable: [005:bank]+= variable[004:deposit]
<>Change money: - variable: [004:Deposit]
<>Variable: [004:deposit]-=variable: [004:deposit]
<>Message: You now have a balance of \c[3]\v[3]\c[0]

which makes it look like you are using variable 5 to keep track of your balance. In this case, this part of the event should look like:

<>Message: You deposit \c[3]\v[4]\c[0] gold
<>Variable: [005:bank]+= variable[004:deposit]
<>Change money: - variable: [004:Deposit]
<>Variable: [004:deposit]-=variable: [004:deposit]
<>Message: You now have a balance of \c[3]\v[5]\c[0]

I think that your problem lies in a mislabelling of your variables in the messages. So go through them and change them and post back if it turns out that isn't the problem

Tsunokiette

If I'm not mistaken, it looks a lot like the one I posted 2 years ago when I first came here.

If it is, I'm going to have to make an updated (and simpler) version.
"The wonderful thing about Tiggers
Is Tiggers are wonderful things
Their tops are made out of rubber
Their bottoms are made out of springs

They're bouncy, trouncy, flouncy, pouncy
Fun, fun, fun, fun, fun!
But the most wonderful thing about Tiggers
Is I'm the only one, I'm the only one."

XtheExecutioner

yea it is the one you posted a long time ago i was going through the tuts and found yours and decided to use it. Thank you both for helping me i will tell you if it is fixed the next time i get to work on it.
OF HELLS DESIGN. IMPOSSIBLE IS NOTHING!

:)

Watch out for: HaloOfTheSun

XtheExecutioner

I Fixed it YAY! It was the fact that i was just copying what was in the tut when i did /v[1] and stuff i forgot that i had to put the variables i made in replace of the numbers. I wasn't really paying attention. Thnx for helping!
OF HELLS DESIGN. IMPOSSIBLE IS NOTHING!

:)

Solved? Add [RESOLVED] to topic title.
Watch out for: HaloOfTheSun

XtheExecutioner

its already there and i didn't do it....
OF HELLS DESIGN. IMPOSSIBLE IS NOTHING!

:)

Watch out for: HaloOfTheSun