Charas-Project

  • Home
  • Help
  • Search
  • Calendar
  • Login
  • Register
*
Please login or register.

Login with username, password and session length
 

News:

New forum theme up and running!



  • Charas-Project »
  • Game Creation »
  • Requests »
  • RPG Maker Programming »
  • Bank System
« previous next »
  • Print
Pages: [1]

Author Topic: Bank System  (Read 2737 times)

Offline neb87

  • Zealot
  • *
  • Posts: 627
Bank System
« on: February 20, 2006, 07:03:21 AM »
This is what i have for a bank system!
Message-What do you want to do?
Choice-1.Deposit 2.Withdraw 3.Leave
 1.Deposit
  Variable Oper:[current money] Set Money
  Message-How much would you like to deposit?
  Input Number-5 digit[enterted money]
  Branch if [enterted money] is V[current money] Greater
   Variable Oper:[enterted money] Set, Var [current money]'s value
  End
   Variable Oper:[bank money]+, Var [enterted money]'s value
   Change Money: V[enterted money]add
 2.Withdraw
  Message-How much would you like to Withdraw?
  Input Number-5 digit[enterted money]
  Branch if [enterted money] is V[bank money] Greater
   Variable Oper:[enterted money] Set, Var [bank money]'s value
  End
   Change Money: V[enterted money]add
   Variable Oper:[bank money]-, Var [entered money]'s value

         I got most of this from gaming world but it doesn't work when i use it, does anybodie see the problem or know how to make a working bank system?  
Logged

Offline ZeroKirbyX

  • has died of dysentery.
  • Sage
  • *
  • Posts: 6,132
  • Boop a Doop a Doop
(No subject)
« Reply #1 on: February 20, 2006, 07:15:01 AM »
The only way I know is they way I used it from the PS1 version which'd take about 250 switches XD
Logged

Offline neb87

  • Zealot
  • *
  • Posts: 627
(No subject)
« Reply #2 on: February 20, 2006, 08:29:02 AM »
i got a differnt tut but am having problems with the withdrawls now!!
--------So if anybodie has a working bank system, help me out!!
Basicalliy the problem is that i can put money in the bank with only how much i have and i can withdraw however much i have in bank but i can withdraw it again again(doesn't take money out of bank.
-EXE_I Deposit 1 buck, so i have 0 bucks on me and then i withdraw 1 buck so i have 1 buck on me but i can withdraw 1 buck again and again!
Logged

Offline tutti

  • Member
  • Initiate
  • *
  • Posts: 14
(No subject)
« Reply #3 on: February 20, 2006, 11:13:51 AM »
Try this:

<>Show Choices: Deposit/Withdraw/Leave
: [Deposit] Handler
: <>Message: How much would you like to deposit?
: <>Input number: 6 Digit, [0001: Bank Transaction]
: <>Variable Oper: [0003: Current Money] Set, Money
: <>Branch if Var [0001: Bank Transaction] is V[0003] Less/Equal
: : <>Change Money: V[0001] Remove
: : <>Variable Oper: [0002: Banked Money] +, Var [0001]'s Value
: : <>Message: Your transaction is complete!
: :      :Have a nice day!
: : <>
: : Else Handler:
: : <>Message: You don't have that much!
: : End
: <>
: [Withdraw] Handler
: <>Message: How much would you like to withdraw?
: <>Input number: 6 Digit, [0001: Bank Transaction]
: <>Branch if Var [0001: Bank Transaction] is V[0002] Less/Equal
: : <>Change Money: V[0001] Add
: : <>Variable Oper: [0002: Banked Money] -, Var [0001]'s Value
: : <>Message: Your transaction is complete!
: :      :Have a nice day!
: : <>
: : Else Handler:
: : <>Message: You don't have that much!
: : End
: <>
: [Leave] Handler
: <>
: End
<>
Logged

Offline neb87

  • Zealot
  • *
  • Posts: 627
(No subject)
« Reply #4 on: February 20, 2006, 10:16:31 PM »
Now it doesn't repeatit again and again but if i deposieted 400 in bank and withdraw 400, and can't withdraw again(which is good) but if i withdraw 200 from the 400, there should be 200 left but it says theres no money left!
Logged

Offline DragonBlaze

  • A Wild DB Appeared!
  • Royal
  • *
  • Posts: 3,329
(No subject)
« Reply #5 on: February 20, 2006, 10:51:19 PM »
I looked over tutti's script, and there doesn't appear to be anything wrong with it. Can you take a screenshot of your script(s) dealing with the bank system and post them up here? That way I'll be able to spot any errors you may have.
Logged
Hell Yeah! Just recovered all my old rm2k/3 games from my 10 year old, broken laptop hard drive that had been formatted and had a new OS installed on it. Oh, and I did all of this from my phone. WIN

Offline neb87

  • Zealot
  • *
  • Posts: 627
(No subject)
« Reply #6 on: February 20, 2006, 11:56:50 PM »
heres the code
Logged

Offline DragonBlaze

  • A Wild DB Appeared!
  • Royal
  • *
  • Posts: 3,329
(No subject)
« Reply #7 on: February 21, 2006, 12:39:33 AM »
Ok found the error, in the withdraw handler at the end, you are subtracting the money in the bank by the disposit rather than the withdrawed money.

So yeah instead of subracting the money in the bank by [0015], subtract it by [0016] ;)
Logged
Hell Yeah! Just recovered all my old rm2k/3 games from my 10 year old, broken laptop hard drive that had been formatted and had a new OS installed on it. Oh, and I did all of this from my phone. WIN

Offline neb87

  • Zealot
  • *
  • Posts: 627
(No subject)
« Reply #8 on: February 21, 2006, 12:52:13 AM »
thnaks working good
Logged

  • Print
Pages: [1]
« previous next »
  • Charas-Project »
  • Game Creation »
  • Requests »
  • RPG Maker Programming »
  • Bank System
 

  • SMF 2.0.10 | SMF © 2015, Simple Machines
  • XHTML
  • 2O11
  • RSS
  • WAP2
  • Simple Machines Forum