I downloaded your code and placed it in a completely new directory. I then copied the inventory.bb above and overwrote the old one.
I get four errors:
error: "duplicate identifier" in inventory.bb
solution: delete pickedup Type in util.bb
error: "type invitem not found" in player.bb
solution: change Field inv.invItem[20] to Field inv.pickedup[20]
error: "illegal type conversion" in script.bb
solution: change "Pv\player = pl\id" to "Pv\player = pl"
error: "illegal type conversion" in players.bb (line 343)
solution: change:
to
and it works. Stick
to
And that's it. I tried to keep it all contained in the inventory.bb file, that's why it's a little complicated. I'm trying to make it as modular as I can.
I get four errors:
error: "duplicate identifier" in inventory.bb
solution: delete pickedup Type in util.bb
error: "type invitem not found" in player.bb
solution: change Field inv.invItem[20] to Field inv.pickedup[20]
error: "illegal type conversion" in script.bb
solution: change "Pv\player = pl\id" to "Pv\player = pl"
error: "illegal type conversion" in players.bb (line 343)
solution: change:
If p\player = player And p\obj =keyid Then Delete p:Return True
to
If p\player\id = player And p\obj =keyid Then Delete p:Return True
and it works. Stick
drawBothInventories() in the draw() function and If KeyHit(57) Then showInventory(First player)somewhere to open the inventory window. It's basic, but it works for the moment.To get it to work properly you just have to add an object to the inventory. This happens when in the script.bb when you pick stuff up. In the script.bb file on line 263 ("case addkey") change the code from:
Pv.pickedup = New pickedup Pv\player = pl\id Pv\obj=Int(si\param)+2
to
; (obj, weight, player.player, image, frame) InvItem_Create(Int(si\param)+2,0,pl,objects,Int(si\param)+1)
And that's it. I tried to keep it all contained in the inventory.bb file, that's why it's a little complicated. I'm trying to make it as modular as I can.