ID:178548
 
I've been trying to make a code that limits how many items you may have but none works, so can someone help me
Thanks

~2k
This is basicaly all you need:

<code>mob/var/max_items = 5 mob/Enter() if(src.contents.len > max_items) return 0 else return 1</code>

Just check to see if the player's contents length is over a certain point, and if it is don't let them add anything else to their contents. You'll also want to make any Get() actions, have an alternative "You can't get that message!" to make it look right, like this:

<code>obj/Get() if(Move(usr)) usr << "You got it!" else usr << "You don't got it!"</code>
In response to Foomer
thanks