ID:144442
 
Code:


Problem description:
You haven't defined "wood" in the path type /obj/wild/trees, but rather /obj/wild/trees/Catarnian_Tree. Since the proc is a member of /obj/wild/trees, it has no access to one of it's child types.

In your code, I noticed some things that can be improved:

- You are using an if(/obj/tools/Axe in usr.contents) check. That will not work, since a path type cannot be inside an object's contents. You will have to use locate() to find an instance of it. "contents" is also implied when you just state the reference of the object.

if(locate(/obj/tools/Axe) in usr)


- You can have weighted 'picks' instead of doing what you are currently doing. Take a look at the pick() page in the DM reference

- You should be using switch() if you want to keep on checking for the value of one variable, as it is much faster and easier to read.

- The design of your wood piece structures can be vastly improved. Instead of having different path types for the amount of pieces of wood, you can just define a variable for one wood object to tell the value of how many pieces it has. You can then update the icon_state of the wood object when it needs to be changed.
In response to Unknown Person
Um...src and usr are the same thing in this case aren't they. If so, then you're trying to call an objects var on a player, which won't work.

It's like 1am so I might not be thinking clearly but I'm pretty sure...
In response to Pyro_dragons
No, they are not.

An obj has a verb. When a player calls that verb, usr is the player running the verb, src is the obj.