[16/03/2014 14:37:50] [Error - GlobalEvent Interface] [16/03/2014 14:37:50] data/globalevents/scripts/shopModernAcc.lua:onThink [16/03/2014 14:37:50] Description: [16/03/2014 14:37:50] data/globalevents/scripts/shopModernAcc.lua:20: attempt to call global 'doPlayerGiveItemSHOP' (a nil value) [16/03/2014 14:37:50] stack traceback: [16/03/2014 14:37:50] data/globalevents/scripts/shopModernAcc.lua:20: in function <data/globalevents/scripts/shopModernAcc.lua:1> [16/03/2014 14:37:50] [Error - GlobalEvents::think] Couldn't execute event: shopModernAAC
alguem sabe oq é? esse e o shop que eu uso '-'
function onThink(interval, lastExecution, thinkInterval)
local result = db.getResult("SELECT * FROM shop_history WHERE `processed` = 0;")if(result:getID() ~= -1) thenwhile(true) docid = getCreatureByName(tostring(result:getDataString("player")))product = tonumber(result:getDataInt("product"))idTransaction = tonumber(result:getDataInt("id"))itemr = db.getResult("SELECT * FROM shop_offer WHERE `id` = "..product..";")if isPlayer(cid) thenlocal id = tonumber(itemr:getDataInt("item"))local tid = tonumber(result:getDataInt("id"))local count = tonumber(itemr:getDataInt("count"))local tipe = tonumber(itemr:getDataInt("type"))local productn = tostring(itemr:getDataString("name"))if isInArray({5,8},tipe) thenif getPlayerFreeCap(cid) >= getItemWeightById(id, count) then--if isContainer(getPlayerSlotItem(cid, 3).uid) thenreceived = doPlayerGiveItemSHOP(cid, id, count, 0, idTransaction)--received = doAddContainerItem(getPlayerSlotItem(cid, 3).uid, id,count)if received == true thendoPlayerSendTextMessage(cid,19, "You have received >> "..productn.." << from our shop system")db.executeQuery("UPDATE `shop_history` SET `processed`='1' WHERE id = " .. tid .. ";")elsedoPlayerSendTextMessage(cid,19, "Sorry, you don't have enough space on container to receive >> "..productn.." <<")end--else--doPlayerSendTextMessage(cid,19, "Sorry, you don't have a container to receive >> "..productn.." <<")--endelsedoPlayerSendTextMessage(cid,19, "Sorry, you don't have enough capacity to receive >> "..productn.." << (You need: "..getItemWeightById(id, count).." Capacity)")endelseif isInArray({6,7},tipe) thenif tipe == 6 thenbcap = 8bid = 1987elseif tipe == 7 thenbcap = 20bid = 1988endif isItemRune(id) thencount = 1endif getPlayerFreeCap(cid) >= (getItemWeightById(1987, 1) + getItemWeightById(id,count * bcap)) then--local bag = doCreateItemEx(bid, 1)--for i = 1,bcap do--doAddContainerItem(bag, id, count)--endreceived = doPlayerGiveItemContainer(cid, 1988, id, count, 0)--received = doPlayerAddItemEx(getPlayerSlotItem(cid, 3).uid, bag)if received == true thendoPlayerSendTextMessage(cid,19, "You have received >> "..productn.." << from our shop system")db.executeQuery("UPDATE `shop_history` SET `processed`='1' WHERE id = " .. tid .. ";")elsedoPlayerSendTextMessage(cid,19, "Sorry, you don't have enough space to receive >> "..productn.." <<")endelsedoPlayerSendTextMessage(cid,19, "Sorry, you don't have enough capacity to receive >> "..productn.." << (You need: "..getItemWeightById(id, count).." Capacity)")endendenditemr:free()if not(result:next()) thenbreakendendresult:free()endreturn trueend