Wifebeater
New Member
- Joined
- Feb 24, 2011
- Messages
- 60
- Reaction score
- 1
Hi, i have 8.54 server . When i have the server on for a few hours
My chests lag, When you press on them,. and get an item. The whole server lags for like 0,5 seconds. and then it's back again,
rly annoying, I get this error in console
here someone pressed on a chest to get Gold coins. And there's several errors like this depending on what chest he presses on and all errors are the same.
here's the coin.lua script . I've used same script for all chests in game.
Help me, why does it lag when u press on the chest and get an item?
BTW, The lag does not appear if the chest is empty. it only lags when you get an item
My chests lag, When you press on them,. and get an item. The whole server lags for like 0,5 seconds. and then it's back again,
rly annoying, I get this error in console
Code:
[26/04/2011 22:30:11] [Error - Action Interface]
[26/04/2011 22:30:11] data/actions/scripts/startitem/coin.lua:onUse
[26/04/2011 22:30:11] Description:
[26/04/2011 22:30:11] (luaDoAddContainerItem) Container not found
here someone pressed on a chest to get Gold coins. And there's several errors like this depending on what chest he presses on and all errors are the same.
here's the coin.lua script . I've used same script for all chests in game.
HTML:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerStorageValue(cid, 1043) < 1 then
local bp = doPlayerAddItem(cid, 2160, 5)
doAddContainerItem(bp, 2152, 100)
doAddContainerItem(bp, 2273, 10)
doAddContainerItem(bp, 2268, 10)
doAddContainerItem(bp, 2313, 30)
doAddContainerItem(bp, 2311, 50)
setPlayerStorageValue(cid, 1043, 1)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have found 5 Crystal coins.")
else
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "It is empty.")
end
return TRUE
end
Help me, why does it lag when u press on the chest and get an item?
BTW, The lag does not appear if the chest is empty. it only lags when you get an item