ID:169175
 
Last NIght when i was coding up a bank loan system i got this error

bankloan.dm:6:error::empty type name (indentation error?)

and how can i fix it with this coding heres my coding

mob
NPC// the Bank Keeper
Banker
icon = 'banker.dmi'
icon_state = "banker"
Click()
if(!(usr in oview(2,src)))
return
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=="Get Loan")
if(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()


How can i fix this?
> mob
> NPC// the Bank Keeper
> Banker
> icon = 'banker.dmi'
> icon_state = "banker"
> Click()
> if(!(usr in oview(2,src)))
> return
> 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=="Get Loan")
> if(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()
>

Try that.
In response to Strawgate
Why would you want a $10,000 loan if perhaps you only needed $1,000? That can be changed with a wand of my magical DM stick I brought him along...
var/loanamount = input("How much would you like to be lent?","Bank")as num
var/loanmax = usr.zenni * 2
, double yourself is the answer! :-D
In response to Cheetoz
Thanks but i still get this error

bankloan.dm:9:loanamount :warning: variable defined but not used
bankloan.dm:10:loanmax :warning: variable defined but not used


On Lines 9 and 10 How can i fix it
In response to Govegtos
Use them.
In response to Ol' Yeller
And also, I may be incorrect here but shouldn't you be using src, not usr? This IS a proc...
In response to Flerix
It's Click(), so you're forced to use usr unless referring to the thing clicked.
In response to Ol' Yeller
Oooh, I haven't ever used Click() much. Thanks for the enlightenment.
Govegtos wrote:
> mob
> NPC// the Bank Keeper
> Banker
> icon = 'banker.dmi'
> icon_state = "banker"
> Click()
> if(!(usr in oview(2,src)))
> return
> 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=="Get Loan")
> if(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()
>

Thats what you want, That click() proc is meant only for /mob/NPC/Banker I'm assuming
In response to DarkCampainger
...this guy is a pure newb, he dosent even know how to put in vars
In response to Cheetoz
If you're reffering to me, I'll have to point out I have a published library, and you don't =p
In response to DarkCampainger
He was talking about Govegtos. He refuses to actually learn how to program.
In response to N1ghtW1ng
Oh, I didn't realise he was the same person from the unlockable character post..... Silly me =p
In response to DarkCampainger
And yes i do know how to define proc and vars or are you a complete retard to understand that?
In response to Govegtos
Your the "retard".

You think ripping is fine, and refuse to learn how to program.

Hell, You have trouble with if() statements. Tell me you dont, and I'll get some of our chat logs out.
In response to Smoko
Smoko wrote:
Your the "retard".

lawl "your"

Sorry I'm a grammar nazi

~Kujila
In response to Govegtos
oh no you cant, check the loan thing, i gave you a max loan and a loan var defined and u said what do i do with it?
In response to Cheetoz
You really need to stop ripping games, stop getting old code from the forums and having us fix your errors. You have been doing that for 18 months(look at his posts)

Learn How To Code!
In response to Xx Dark Wizard xX
:p
Hate to say it, but you're being hypocritical or however you spell it. (one of)Your game uses ripped Dragon Warrior icons.
In response to Kujila
This guy must think ripping is a drug, cause from all the code we gave him, he couldve had his own non-zeta rip, and with all the poo we gave him, it would be decent too
Page: 1 2