• 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!

method "isItem" bug

Svira

Active Member
Joined
Jan 27, 2008
Messages
267
Solutions
11
Reaction score
36
I have no idea why he returns this error to me ... can you help me?
TFS 1.2

Lua:
Lua Script Error: [Action Interface]
data/actions/scripts/stat_slot.lua:onUse
data/stats.lua:1244: attempt to call method 'isItem' (a nil value)

1244:
Code:
local itemEx = {
    uid = target:isItem() and target:getUniqueId() or target:getId(),
    itemid = target:isItem() and target:getId() or 0
}
 
I have no idea why he returns this error to me ... can you help me?
TFS 1.2

Lua:
Lua Script Error: [Action Interface]
data/actions/scripts/stat_slot.lua:onUse
data/stats.lua:1244: attempt to call method 'isItem' (a nil value)

1244:
Code:
local itemEx = {
    uid = target:isItem() and target:getUniqueId() or target:getId(),
    itemid = target:isItem() and target:getId() or 0
}
data/lib/compat/compat.lua
and add
Lua:
function isItem(uid) return Item(uid) end
 
Thats not where the error is, the error lies in the script where you have this:

Lua:
local itemEx = {
    uid = target:isItem() and target:getUniqueId() or target:getId(),
    itemid = target:isItem() and target:getId() or 0
}

However, the fuction isItem that you posted is not the one you are looking for.
 
Back
Top