Dictionary error

I have this little code here receiving from another big Dictionary:

local ITEM_ID = frame.Item_ID.Value
local ITEM_INFO = {}
warn(ITEM_INFO)

for i, data in pairs(TABELA_RECEBIDA) do
	print(i)
	warn(data)
	if data[1] == ITEM_ID then
		print("Data do item ID!")
		ITEM_INFO = data[2]
		break
	end
end
print("NOVA TABELA: ITEM_INFO:")
print(ITEM_INFO) -- this prints fine as a usual dictionary
print(ITEM_ID.Nome) -- LINE GIVING ERROR!!!!!!!!

THE OUTPUT: error 83: attempt to index number with “Nome”
Imgur

as you can see the error makes no sense, since the Dictionary is simple:

ITEM_INFO = {
   ["Nome"] = "Rossi",
   ["Pos Padrão"] = ....
}

NEVERMIND!
its a write error i’ve done! That’s why you need to sleep as the mind start to give blue screen xD

WRONG:

print(ITEM_ID.Nome) -- LINE GIVING ERROR!!!!!!!!

RIGHT:

print(ITEM_INFO.Nome) -- LINE GIVING ERROR!!!!!!!!
1 Like

I think you meant for this:

print(ITEM_ID.Nome)

to be

print(ITEM_INFO.Nome)
1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.