ID:145458
 
Code:
//Lords of Koroko-Softskydestruction, Friday, March 17, 2006.

mob
icon = 'person.dmi'

var
HP = 30
wealth = 0

Del()
var/obj/gold/G = new(loc)
G.amount = rand(1,100)
..()

Login()
icon_state = gender
..()

Bug
icon = 'bug.dmi'

proc
Deathcheck()
if (HP <= 0)
world << "[src] dies!"
del(src)
verb

attack(mob/M as mob in oview(1))
if (M.HP <= 0)
usr << "[M] is already dead!"
else
usr << "You attack [M]!"
oview() << "[usr] attacks [M]"
var/damage = rand(1,10)
world << "[damage] damage!"
M.HP -= damage
M.Deathcheck()

say(msg as text)

world << "[usr]: [msg]"

obj
gold
icon = 'gold.dmi'

var
amount

verb
get()
set src in view(1)
usr << "You pick up [amount] gold."
usr.wealth += amount
del(src)
turf
grass
icon = 'grass.dmi'

world
turf = /turf/grass


Problem description:
I am using the ZBT tutorial.
I did everything it asks. Then I get these errors.

loading Lords of Koroko.dme
Lords of Koroko.dm:12:error:G.amount:undefined type: G.amount
Lords of Koroko.dm:11:error:G :unknown variable type

Lords of Koroko.dmb - 2 errors, 0 warnings (double-click on an error to jump to it)


It seems to a have a problem with this part here.

Del()
var/obj/gold/G = new(loc)
G.amount = rand(1,100)
..()



You defined mob/obj/gold, not /obj/gold.
In response to Mysame
Thank you that worked perfectly!