ID:145873
 
        banker
name = "Banker (NPC)"
name="Banker"
icon_state="person1"
verb/Talk()
set src in oview(3)
set category="NPC"
switch(input("Hello, Welcome to the Bank, how may i help you?","-= Bank =-")in list("Withdraw","Deposit","Balance","loan","Nothing"))
if("Deposit")
if(alert("We take 10% of the Zenni you deposit, would you still like to continue?","Deposit","Yes","No") == "Yes")
var/D = input("How much Zenni you want to deposit?","Deposit Zenni") as num
D = round(D)
if(D > usr.zenni || isnull(D))
alert("You dont have that much to deposit.","Deposit","Ok")
else if(D <= 0)
alert("You cant deposit less then 1.","Deposit","Ok")
return
else
D -= D/10
usr.Bankzenni += D
usr.zenni -= D
alert("You Deposit [D] Zenni.","Deposit","Finish")
if("Withdraw")
alert("Your Current Bank Total Is: [usr.Bankzenni] Zenni.")
var/W = input("How much Zenni do you wish to withdraw, [usr]?","Withdraw Zenni") as num
W = round(W)
if(W > usr.Bankzenni || isnull(W))
alert("You dont have that much Zenni.","Withdraw","Ok")
else if(W <= 0)
alert("You can't withdraw less then 1.","Withdraw","Ok")
return
else
usr.Bankzenni -= W
usr.zenni += W
alert("You Withdraw [W] Zenni.","Withdraw","Finish")
var/choice=input(usr,"Hey [usr.name]! What can I do for you?","Bank") as null|anything in list("Get Loan","Pay Loan")
if(choice=="Loan")
(alert(usr,"We are currently offering $10,000 loans, with %1.4 - %1.6 interest. Would you like one?","Loan","Yes","No")=="Yes")
usr.zenni += 10000
usr.loan += 10000
usr.loan()
if("Balance")alert("Balance: [usr.Bankzenni] Zenni.","Balance")
if("Nothing")alert("Come back, Anytime!","Bank")


Thats my coding now heres the errors i get in from that

mobs.dm:210:error: proc definition not allowed inside another proc

How can i fix that?

Wait I know you!...That really annoying zeta ripper that everyone hated. Well I choose not to dwell on the past, so I really don't care anymore, as long as you don't do it now. So lets see...I have no idea if its zeta code, but it seems that

a. else if(D <= 0)?

Wjat? Its just else

b. if(choice=="Loan")

what the? the stuff below it isnt indented.

c. alert stuff

the 2 alerts at the bottom have to be indented
In response to Lou
Lou wrote:
Wait I know you!...That really annoying zeta ripper that everyone hated. Well I choose not to dwell on the past, so I really don't care anymore, as long as you don't do it now. So lets see...I have no idea if its zeta code, but it seems that

a. else if(D <= 0)?

Wjat? Its just else

b. if(choice=="Loan")

what the? the stuff below it isnt indented.

c. alert stuff

the 2 alerts at the bottom have to be indented

                        if(choice=="Loan")
(alert(usr,"We are currently offering $10,000 loans, with %1.4 - %1.6 interest. Would you like one?","Loan","Yes","No")=="Yes")
usr.zenni += 10000
usr.loan += 10000
usr.loan()
if("Balance")alert("Balance: [usr.Bankzenni] Zenni.","Balance")
if("Nothing")alert("Come back, Anytime!","Bank")


Now get these errors

mobs.dm:212::warning: operation has no effect here
mobs.dm:210:choice :warning: variable defined but not used
In response to Lou
Lou wrote:
Wait I know you!...That really annoying zeta ripper that everyone hated. Well I choose not to dwell on the past, so I really don't care anymore, as long as you don't do it now. So lets see...I have no idea if its zeta code, but it seems that

a. else if(D <= 0)?

Wjat? Its just else

b. if(choice=="Loan")

what the? the stuff below it isnt indented.

c. alert stuff

the 2 alerts at the bottom have to be indented

A. No, else if() is fine.
B. Yes.
C. No, they are fine as they are.
obj
banker
name = "Banker (NPC)"
name="Banker"
icon_state="person1"
verb/Talk()
set src in oview(3)
set category="NPC"
switch(input("Hello, Welcome to the Bank, how may i help you?","-= Bank =-")in list("Withdraw","Deposit","Balance","loan","Nothing"))
if("Deposit")
if(alert("We take 10% of the Zenni you deposit, would you still like to continue?","Deposit","Yes","No") == "Yes")
var/D = input("How much Zenni you want to deposit?","Deposit Zenni") as num
D = round(D)
if(D > usr.zenni || isnull(D))
alert("You dont have that much to deposit.","Deposit","Ok")
else if(D <= 0)
alert("You cant deposit less then 1.","Deposit","Ok")
return
else
D -= D/10
usr.Bankzenni += D
usr.zenni -= D
alert("You Deposit [D] Zenni.","Deposit","Finish")
if("Withdraw")
alert("Your Current Bank Total Is: [usr.Bankzenni] Zenni.")
var/W = input("How much Zenni do you wish to withdraw, [usr]?","Withdraw Zenni") as num
W = round(W)
if(W > usr.Bankzenni || isnull(W))
alert("You dont have that much Zenni.","Withdraw","Ok")
else if(W <= 0)
alert("You can't withdraw less then 1.","Withdraw","Ok")
return
else
usr.Bankzenni -= W
usr.zenni += W
alert("You Withdraw [W] Zenni.","Withdraw","Finish")
var/choice=input(usr,"Hey [usr.name]! What can I do for you?","Bank") as null|anything in list("Get Loan","Pay Loan")//this is your problem, take it one tab back, and also i dont see a use for this var in your code
if(choice=="Loan")
(alert(usr,"We are currently offering $10,000 loans, with %1.4 - %1.6 interest. Would you like one?","Loan","Yes","No")=="Yes")
usr.zenni += 10000
usr.loan += 10000
usr.loan()
if("Balance")alert("Balance: [usr.Bankzenni] Zenni.","Balance")
if("Nothing")alert("Come back, Anytime!","Bank")





var/choice=input(usr,"Hey [usr.name]! What can I do for you?","Bank") as null|anything in list("Get Loan","Pay Loan")//this is your problem, take it one tab back, and also i dont see a use for this var in your code
In response to Govegtos
                        if("Loan")
alert(usr,"We are currently offering $10,000 loans, with %1.4 - %1.6 interest. Would you like one?","Loan","Yes","No")=="Yes")
usr.zenni += 10000
usr.loan += 10000
usr.loan()
if("Balance")alert("Balance: [usr.Bankzenni] Zenni.","Balance")
if("Nothing")alert("Come back, Anytime!","Bank")


alert not a (alert
if("Loan") not a if(choise=="Loan")
Before asking how to fix "that" you should know what the error means.

"mobs.dm:210:error: proc definition not allowed inside another proc"

That is proper english; you should understand it. Oh well. That error means that you can't define a proc in a proc.
Now go and look for the source of your problem.

I wonder from who you ripped this code this time... =|

O-matic
In response to O-matic
                    if("Loan")
alert(usr,"We are currently offering $10,000 loans, with %1.4 - %1.6 interest. Would you like one?","Loan","Yes","No")=="Yes")
usr.zenni += 10000
usr.loan += 10000
usr.loan()


Now these errors

mobs.dm:212:error: ): expected }
mobs.dm:212:error: location of top-most unmatched {
mobs.dm:212:error: ): expected }
mobs.dm:183:error: location of top-most unmatched {

Whats the problem now?
In response to Govegtos
Govegtos wrote:
>                   if("Loan")
> alert(usr,"We are currently offering $10,000 loans, with %1.4 - %1.6 interest. Would you like one?","Loan","Yes","No")=="Yes")
> usr.zenni += 10000
> usr.loan += 10000
> usr.loan()
>

Now these errors

mobs.dm:212:error: ): expected }
mobs.dm:212:error: location of top-most unmatched {
mobs.dm:212:error: ): expected }
mobs.dm:183:error: location of top-most unmatched {

Whats the problem now?

Well, the immediate error is that you have that '=="Yes")' at the end. Also, that alert() does nothing. It's not attached to a variable, or a switch(). So, if you pick No, you still are getting the loan whether you want it or not. A bankers dream...