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

TFS 1.X+ Keys.lua Action Problem.

myalitth

New Member
Joined
Jan 13, 2013
Messages
69
Reaction score
3
Lua Script Error: [Test Interface]
data/actions/scripts/other/keys.lua
data/actions/scripts/other/keys.lua:5: attempt to call global 'getItemInfo' (a nil value)
stack traceback:
[C]: in function 'getItemInfo'
data/actions/scripts/other/keys.lua:5: in main chunk
[Warning - Event::checkScript] Can not load script: scripts/other/keys.lua

Lua:
REVERSE_DOORS, CHILD_DOORS = {}, {}
for k, v in pairs(DOORS) do
    REVERSE_DOORS[v] = k

    local tmp = getItemInfo(v)
    if(tmp.transformUseTo ~= 0) then
        CHILD_DOORS[tmp.transformUseTo] = k
    end
end
 
tfs 1.0+ doesn't use getItemInfo anymore.

You would want to use ItemType now.

That being said, 'transformUseTo' doesn't exist in items.xml.

Without knowing exactly what you're trying to do, there's not much else I can offer in guidance.
 
I'm trying to do a key door system :(
What's wrong with the default one?

Put the same actionid on both the door and the key, and they are able to unlock/lock?


if you find doors.lua, you can see how it functions
 
im using a base downgraded 8.60 to 7.92 and i need to add some fuctions again.
my doors working fine, but the key system no.
Normal keys like silver key id 4141...
 
im using a base downgraded 8.60 to 7.92 and i need to add some fuctions again.
my doors working fine, but the key system no.
Normal keys like silver key id 4141...
Well good luck then.

Nothing I can further help you with until you ask a question / have another error.
 
Back
Top