RazorBlade
Retired Snek
Hello all.
Just wondering how I might access item attributes in a script in TFS 1.0. Specifically, I need to access the text attribute of an item and retrieve the value. I couldn't find any functions related to this in the source or in compat.lua
Is there a way to access this attribute by default?
EDIT
Nevermind, I just made my own function in compat.lua
Just wondering how I might access item attributes in a script in TFS 1.0. Specifically, I need to access the text attribute of an item and retrieve the value. I couldn't find any functions related to this in the source or in compat.lua
Is there a way to access this attribute by default?
EDIT
Nevermind, I just made my own function in compat.lua
Code:
function getItemText(uid)
local item = Item(uid)
if item == nil then
return false
end
return item:getAttribute(ITEM_ATTRIBUTE_TEXT)
end
Last edited: