Hello OtLand'ss!!! First, sorry for my english.
There is something very wrong with OTX. I'm not sure to say if it is possibly in otx but, the storages kind of bug ...
I searched a lot on the internet but all topics die.
Look at a script:
It works Ok! However, occasionally the error:
Line 6 is this ...
How can you give this error if you have no player with such storage?
I also had many other problems with scripts that involve storage .... What could that be? For example, a task randomly gives an error in which it leaves the player with a symbol value, and sometimes NULL.
This does not always happen, it is very random. And it happens with any script.
I removed a bestiary script that I had and started bugging the task script.
Line 322 from lib/tasks.lua:
It's a very serious bug, which I can't solve
If you add a table like int(11) or something close, it bugs and stays at 0.
Please, HELP-MEE!!
There is something very wrong with OTX. I'm not sure to say if it is possibly in otx but, the storages kind of bug ...
I searched a lot on the internet but all topics die.
Look at a script:
LUA:
function onThink(cid, interval)
if(not isPlayer(cid)) then
return true
end
if getPlayerStorageValue(cid, 43004) > 0 then
if (getPlayerFood(cid) < 1200) then
doPlayerFeed(cid, 1200)
end
end
return true
end
It works Ok! However, occasionally the error:
Code:
[4:21:20.888] [Error - CreatureScript Interface]
[4:21:20.888] data/creaturescripts/scripts/chocolateDosDeuses.lua:onThink
[4:21:20.888] Description:
[4:21:20.888] data/creaturescripts/scripts/chocolateDosDeuses.lua:6: attempt to compare number with string
[4:21:20.888] stack traceback:
[4:21:20.888] data/creaturescripts/scripts/chocolateDosDeuses.lua:6: in function <data/creaturescripts/scripts/chocolateDosDeuses.lua:1>
Line 6 is this ...
Code:
if getPlayerStorageValue(cid, 43004) > 0 then
How can you give this error if you have no player with such storage?
I also had many other problems with scripts that involve storage .... What could that be? For example, a task randomly gives an error in which it leaves the player with a symbol value, and sometimes NULL.
This does not always happen, it is very random. And it happens with any script.
I removed a bestiary script that I had and started bugging the task script.
Code:
[2:33:00.665] [Error - CreatureScript Interface]
[2:33:00.665] data/creaturescripts/scripts/taskOnKill.lua:onKill
[2:33:00.665] Description:
[2:33:00.665] data/lib/tasks.lua:322: bad argument #2 to 'max' (number expected, got string)
[2:33:00.665] stack traceback:
[2:33:00.665] [C]: in function 'max'
[2:33:00.665] data/lib/tasks.lua:322: in function 'getTaskKills'
[2:33:00.665] data/creaturescripts/scripts/taskOnKill.lua:29: in function <data/creaturescripts/scripts/taskOnKill.lua:1>
Line 322 from lib/tasks.lua:
Code:
return math.max(0, getPlayerStorageValue(cid, self.killStorage + taskId))
It's a very serious bug, which I can't solve
If you add a table like int(11) or something close, it bugs and stays at 0.
Please, HELP-MEE!!