Alright, so I'm trying to work with a list for a store in my game... I can
sell things to the store, but when I try to buy, the code fails and says can't read ""Ruby.Value""... I thought that this was because in my list "Ruby" is only the name of the object, and DM doesn't know what Ruby means or where it is defined. My code looks like this:
Code:
var/list/shop = list("Ruby")as obj
Now, I thought in order to explain where the Ruby is, I'd do it like this:
var/list/shop = list("Ruby",Ruby) as obj
But this comes up as an error because DM thinks Ruby is an undefined variable. so to beat this I figured I'd define the Ruby by its root.
var/list/shop = list("Ruby",/obj/Ruby) as obj
This compiled properly, but doesn't actually define the root, just puts the root in the list of things I can buy...
My main priority is telling DM what I am trying to buy so DM can read obj.Value and sell it to me.
I believe this is an easy problem, and it is do to the fact I don't understand how to call or execute a list properly.
If someone can help me out with this I'd really appreciate it.
By default, input() in list shows the names of objects in the list.