Walraven // Forums // Thread 2019

"count waterskins" doesn't work. Can't find that to count., sora, 2004-08-10 13:22:22
"count waterskins" doesn't work. Can't find that to count.
hrm, allaryin, 2004-08-10 14:07:00
Wierd. Plural is set correctly and such... I'm not seeing any immediate reason for this to fail. It's all object identification code, of which I have written none, so I have no clue where else to look ;)
containers, malap, 2004-08-10 21:37:17
Count has problems with containers and currently tries to ignore them.

Containers respond to the name of their contents, so they would get falsely counted. I'm not sure how to fix this one.
Hmm..., acius, 2004-08-13 00:26:02
Containers do respond to the name of their contents, but when they do, they return the contained object, not the container object. This should generally behave as if the contained objects were exposed and visible in the environment of the container. For example, say I have a couple objects:

inventory
waterskin
water (held)

And I do all_present("water", inventory). This would give me back an array containing only the water object, just as if it had been present in the inventory. If you're getting back the container at all, it's a bug.

Note that this might cause you headaches if you're using the return value of id() as a boolean. id() does not return boolean values, it returns an object pointer -- this object pointer is the object that you identified, not the object with the id() function. That's *why* id() returns object pointers -- precisely to allow this sort of aliasing.

If there's still a problem, please post more details.
Hmm, athenon, 2006-08-10 12:54:01
Is it safe to assume that since this thread hasn't seen activity in 2 years that it's dead? :P
<< forum