it work ok they way i want it to by poping up but it asks for total money first then what to do with it i want it to ask wat to do then how much here the code
mob
Bank
icon='banker.dmi'
verb
Talk((mob/A as num))
set src in oview(2)
var/bankchoice = input("What do you want?") in list ( "Deposit","Withdraw")
if(bankchoice == "Deposit")
if(A<=usr.Gold && A>=0)
usr.bank_wealth+=A
usr.Gold-=A
usr << "You deposit [A] Gold"
else usr << "You dont have that much to deposit!"
if(bankchoice == "Withdraw")
if(A>=usr.bank_wealth && A>=0)
usr.bank_wealth-=A
usr.Gold+=A
usr <<"You withdraw [A] Gold"
else usr <<"You dont have that much to withdraw!"
ID:148073
![]() Jul 22 2003, 1:08 am
|
|
![]() Jul 22 2003, 2:39 am
|
|
The verb statment needs to be under the icon stuff, and everything else needs an extra indentation.
|
Kavumaster wrote:
it work ok they way i want it to by poping up but it asks for total money first then what to do with it i want it to ask wat to do then how much here the code Talk(mob/A as num) set src in oview(2) var/bankchoice = input("What do you want?") in list ( "Deposit","Withdraw") switch(bankchoice) //other stuff |
Kavumaster wrote:
Talk((mob/A as num)) That's why its prompting you for a number first. It should ask you for an amount after you've made a choice (deposit or withdraw). |