See the last edit in the last post.
Make sure you're seeing what event last happened so you know if the button should or should not be visible.
Change the bag code too:
Code:
if event == "BAG_UPDATE" then -- only set textures and text for this event
BMUDButton.Label:SetFormattedText("%.0f", itemCount)
BMUDButton:SetNormalTexture(itemTexture)
BMUDButton:SetPushedTexture(itemTexture)
BMUDButton:SetHighlightTexture(itemTexture)
print("Bag Updated", name)
else
print("Other Registered event", name)
end
With this, after a /reload will not show the button because a non BAG_UPDATE event is posted last when entering the world.