ID:148073
 
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!"
The verb statment needs to be under the icon stuff, and everything else needs an extra indentation.
In response to WTS_Leader
thx for pointing that out but it still asks how much first and wat to do with it 2nd
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


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!"

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).
In response to Airjoe
nope dosnt work and when i move the mob/a part around it screws whole code