• 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+ ERROR [Warning - Action::loadFunction] Function & Lua Script Error: [Event Interface]

Svira

Member
Joined
Jan 27, 2008
Messages
81
Best answers
0
Reaction score
8
For a long time I can't deal with some engine errors. All internet searched! Engine TFS 1.3 for tibia 8.6.

Error1
Code:
[Warning - Action::loadFunction] Function "increaseItemId" does not exist.
[Warning - Action::loadFunction] Function "decreaseItemId" does not exist.
[Warning - Action::loadFunction] Function "increaseItemId" does not exist.
error1.jpg

Error2 - monsters dont drop loot. in scripts.xml onDropLoot(it doesn't matter if it's active or not, nothing goes wrong)
Code:
Lua Script Error: [Event Interface]
data/events/scripts/monster.lua:[email protected]
data/lib/core/container.lua:11: attempt to call global 'getLootRandom' (a nil va         lue)
stack traceback:
        [C]: in function 'getLootRandom'
        data/lib/core/container.lua:11: in function 'createLootItem'
        data/events/scripts/monster.lua:11: in function <data/events/scripts/mon         ster.lua:1>
errorloot.jpg

Any idea how to fix it?
 

Nekiro

Excellent OT User
TFS Developer
Support Team
Joined
Sep 7, 2015
Messages
2,131
Best answers
94
Reaction score
990
yes, dont merge datapacks if you have no idea whats going on. Basically you are trying to use methods that arent existing in your source.
 
OP
Svira

Svira

Member
Joined
Jan 27, 2008
Messages
81
Best answers
0
Reaction score
8
in errors there are original tfs 1.3 files, from the beginning komoda goda do not work etc. Is there a chance to fix it?


EDIT##
Solved.
added in global lua
Code:
string.split = function(str, sep)
    local res = {}
    for v in str:gmatch("([^" .. sep .. "]+)") do
        res[#res + 1] = v
    end
    return res
end

function getLootRandom()
    math.randomseed(os.mtime())
    return math.random(0, MAX_LOOTCHANCE) / configManager.getNumber(configKeys.RATE_LOOT)
end
 
Last edited:
Top