TFS 1.X+ ERROR [Warning - Action::loadFunction] Function & Lua Script Error: [Event Interface]

Svira

Premium User
Premium User
Joined
Jan 27, 2008
Messages
49
Best answers
0
Reaction score
4
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

Support Team
Support Team
Joined
Sep 7, 2015
Messages
1,921
Best answers
81
Reaction score
700
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

Premium User
Premium User
Joined
Jan 27, 2008
Messages
49
Best answers
0
Reaction score
4
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