Exactly
New Member
- Joined
- Jul 14, 2014
- Messages
- 117
- Reaction score
- 4
Error console:
Dance.lua
Thanks for help !
[Error - CreatureScript Interface]
data/creaturescripts/scripts/dance.luanDirection
Description:
data/creaturescripts/scripts/dance.lua:19: bad argument #3 to 'max' (number expected, got nil)
stack traceback:
[C]: in function 'max'
data/creaturescripts/scripts/dance.lua:19: in function <data/creaturescripts/scripts/dance.lua:9>
Dance.lua
Lua:
--- Edit by Collo~ gg: 7284838 (c)----
local exhaust = {
storage = 2153,
seconds = 10
}
local storage = 45658
function onDirection(cid, old, current)
if isPlayer(cid) then
if current ~= old and exhaustion.check(cid, exhaust.storage) then
doPlayerSendCancel(cid, 'Don\'t saturate the server making flood.')
return false
else
if getCreatureStorage(cid, storage) == 6 then
exhaustion.set(cid, exhaust.storage, exhaust.seconds)
doCreatureSetStorage(cid, storage, 0)
else
doCreatureSetStorage(cid, storage, math.max(0, getCreatureStorage(cid, storage)) + 1)
end
end
end
return true
end
Thanks for help !