Wintermute Engine > Fixed

Checking if there are no items in inventory

(1/1)

mowren:
Is there a way to check if Game.NumItems oder Game.TotalNumItems is 0/null or undefined or if the inventory is empty?
The situation is that my character doesn't have any items in his inventory and so the inventory shouldn't be available until he takes his first item (and later it I intend to make it unavailable again if all items are used or droped).

Everytime I try something like this and the condition becomes true (in other words, if there are no items in the inventory), Wintermute closes with a crash log which talks about EXCEPTION_ACCESS_VIOLATION.


--- Code: ---var z = Game.NumItems;
if(z == 0)
{
//Do Something
}

--- End code ---

Prote1n:
I got the same problem. I want display a message when the inventory is empty. But simply calling Game.NumItems crashes the game when its null/0

Kinjal:
Fixed. Will be released with "wme 1.9.0.1 (Kinjal Edition v1.2)".

Navigation

[0] Message Index

Go to full version