what is the state of "contents" if the player's inventory is empty?
I tried this (within a mob/player/verb):
if(contents != null)
usr << "You may only have 1 tile at a time"
else
...
---
it compiles, but contents never == null
ID:179226
Feb 1 2002, 8:16 am
|
|
In response to Flick
|
|
yea, that seems to work much better.
thanks Flick! |
if(contents.len == 0)
...
contents is a list, and when evaluating it in an expression like that, it returns a value of /list, no matter what is in it. A list len of 0 means no contents.