Hmm, something like this. Putting the check code in a function means you only need to check it when the player picks up an item. MAX_ITEMS can be replaced with a global if you want the maximum number of items to change.
Hope that helps!
Const MAX_ITEMS = 50 Global Player_Items.Item Global Player_ItemCount = 0 Dim Player_Items.Item(MAX_ITEMS) Function AddItem(p_Item.Item) If Player_ItemCount <= MAX_ITEMS then ;Not carrying too much, add the item Player_ItemCount = Player_ItemCount + 1 Player_Items(Player_ItemCount) = p_Item Else Print "You're carrying too much" EndIf End Function
Hope that helps!