ID:267904
 
Here is what I have
mob
Banker
icon = 'people.dmi'
icon_state = "banker"
var/interest = 0.05
New()
while(usr.bankedgold != 0)
src.interest()

proc/interest()
var/plusgold = usr.bankedgold * interest
usr.bankedgold += plusgold
sleep(600)
verb
Deposit(n as num)
set src in view(1)
if(gold < n)
usr << "Banker: That's too much"
else
usr.bankedgold += n
usr.gold -= n
usr << "Banker: Thank You!"
Withdraw(n as num)
set src in view(1)
if(bankedgold < n)
usr << "Banker: That's too much"
else
usr.bankedgold -= n
usr.gold += n
usr << "Banker: Thank You!"
Check_Account()
set src in view(1)
usr << "Banker: You have [usr.bankedgold] gold in the bank"
I have the default gold when you log in set to 100. I sell an item, get 250 gold for, so i have 350. Then i try to deposit 350 gold and it doesn't work. then I try 101 and it doesn't work but 100 works (a little too much, cuz i get negative gold once i have less than 100 gold)
Plz help
I'm gonna say this before the caveman does: Don't place "usr" in the New() proc, or in a proc at all. "usr" is NOT the correct variable to use for procs.