Returns the name of one of the player's bags. Returns nil for the bank and keyring, for bank bags while the player is not at the bank, and for empty bag or bank bag slots.
See also Container functions.
container- Index of one of the player's bags or other containers (
name- Name of the container (
-- Print the names of the player's bags to chat for i=0,4 do local name = GetBagName(i) if name then print("Bag", i, ":", name) end end