• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Solved TFS 1.0 accessing item attributes

RazorBlade

Retired Snek
Joined
Nov 7, 2009
Messages
2,015
Solutions
3
Reaction score
629
Location
Canada
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
Code:
function getItemText(uid)
    local item = Item(uid)
    if item == nil then
        return false
    end
   
    return item:getAttribute(ITEM_ATTRIBUTE_TEXT)

end
 
Last edited:
Back
Top