uint GetUInt(string name)/ETHEntity

Returns the value of a custom uint variable from the entity. If there is no uint variable with that name it'll return 0.

entity.SetUInt("slotsInBag", 15);
if (entity.GetUInt("slotsInBag") == 15)
    print("It works!");