obj
Axe
desc = "A sturdy axe."
Sword
desc = "A sharp sword."
Hammer
desc = "A large hammer."
// Under mob, under the login proc
usr.Weapons.Add("Axe","Sword","Hammer")
// and this is the verb under mob I'm having trouble with...
checkweapons()
var obj/W = input("Your weapons") in Weapons
world << W.desc
Problem description:
Everything else works fine except when i hit the checkweapons and select a weapon choice, it says:
runtime error: Cannot read "Axe".desc
I assume it has to do with the part that it is text, and not just an object? I'm not sure, please help, I'm fairly new.
I would've used src instead of usr in this case, but basically what you are doing here is adding text strings to the list instead of objects. You need to create a new instance of the object classes and add those to the list instead. Something like this: