ID:264286
 
Code:
obj
Money
icon = 'Yen.dmi'
var
amount
verb
Pick_Up()
set src in view(1)
usr << "You pick up [amount] yen."
usr.wealth+=amount


Problem description: Alright. I can't see were my undfined var is. And i have looked at the Help Guide; not helping. I don't need a code, just a point out and what i shoud replace. Help is nessassary. Anyways for those who can desifer the following, this is the exact message it says:
Money.dm:10:error:wealth.undefined var.


Did you define the var wealth?
In response to Marcmacman
Since im a Dream Maker idiot, though I've read the entire var section in the help booklet, I don't know exactly what you mean. Like make a var for wealth and amount?
In response to Light Yagmi
obj
Money
icon = 'Yen.dmi'
var
amount
wealth // var will be defined umm yeah work will still be needed on code like saying how much amount is on the floor or how much wealth you have keep look up vars in DM ref
verb
Pick_Up()
set src in view(1)
usr << "You pick up [amount] yen."
usr.wealth+=amount
In response to Marcmacman
alright. will do b/c it still says its not correct. thanks ^^



EDIT: bloody hell! its not working!
In response to Marcmacman
Marcmacman wrote:
obj
> Money
> icon = 'Yen.dmi'
> var
> amount
> wealth // var will be defined umm yeah work will still be needed on code like saying how much amount is on the floor or how much wealth you have keep look up vars in DM ref
> verb
> Pick_Up()
> set src in view(1)
> usr << "You pick up [amount] yen."
> usr.wealth+=amount

PS. End your dm tags please =p

you defined obj.wealth he needs to define mob.wealth

with your mob/var add in wealth

mob/var
wealth //this is how rich the player is
In response to Pirion
ill try it tomorrow. i got to go for the night
In response to Light Yagmi
is it a mob/var or a specific type of mob like mob/player?
In response to Dpheonix7
Do this:
mob/var/wealth = 0
mob/var/ammount

mob
money
icon = 'Yen.dmi'
// ..rest of code here