Que resultado seu banco de dados retorna quando você executa este select?
SELECT * FROM shop_history WHERE `processed` = 0;
info
Grupo: Herói
Registrado: 09/07/05
Posts: 1.1k
Reputação: +110
Char no Tibia: Fedrick

Que resultado seu banco de dados retorna quando você executa este select?
SELECT * FROM shop_history WHERE `processed` = 0;
info
Grupo: Campones
Registrado: 09/08/12
Posts: 43
Reputação: +2
Char no Tibia: Sown Sombra

desculpe não entendi a pergunta, eu uso 1 site parecido ao dbo brasil, só da esse erro quando eu compro itens, quando eu compro premmy, não da erro algum oq será isso?
info
Grupo: Herói
Registrado: 12/06/12
Posts: 1k
Reputação: +362
Gênero: Masculino
Char no Tibia: Aarow

Troque seu script do shop que fica no globalevents por este
function onThink(interval, lastExecution, thinkInterval)
local result = db.getResult("SELECT * FROM shop_history WHERE `processed` = 0;")
if(result:getID() ~= -1) then
while(true) do
cid = getCreatureByName(tostring(result:getDataString("player")))
product = tonumber(result:getDataInt("product"))
itemr = db.getResult("SELECT * FROM shop_offer WHERE `id` = "..product..";")
if isPlayer(cid) then
local 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) then
if getPlayerFreeCap(cid) >= getItemWeightById(id, count) then
if isContainer(getPlayerSlotItem(cid, 3).uid) then
received = doAddContainerItem(getPlayerSlotItem(cid, 3).uid, id,count)
if received then
doPlayerSendTextMessage(cid,19, "Você Recebeu Uma >> "..productn.." << do Shop System")
db.executeQuery("UPDATE `shop_history` SET `processed`='1' WHERE id = " .. tid .. ";")
else
doPlayerSendTextMessage(cid,19, "Desculpa, Você não tem espaço para receber o item >> "..productn.." <<")
end
else
doPlayerSendTextMessage(cid,19, "Desculpa, Você não tem espaço para receber >> "..productn.." <<")
end
else
doPlayerSendTextMessage(cid,19, "Desculpa, você não tem cap para receber >> "..productn.." << (You need: "..getItemWeightById(id, count).." Capacity)")
end
elseif isInArray({6,7},tipe) then
if tipe == 6 then
bcap = 8
bid = 1987
elseif tipe == 7 then
bcap = 20
bid = 1988
end
if isItemRune(id) then
count = 1
end
if getPlayerFreeCap(cid) >= (getItemWeightById(1987, 1) + getItemWeightById(id,count * bcap)) then
local bag = doCreateItemEx(bid, 1)
for i = 1,bcap do
doAddContainerItem(bag, id, count)
end
received = doPlayerAddItemEx(getPlayerSlotItem(cid, 3).uid, bag)
if received == RETURNVALUE_NOERROR then
doPlayerSendTextMessage(cid,19, "You have received >> "..productn.." << from our shop system")
db.executeQuery("UPDATE `shop_history` SET `processed`='1' WHERE id = " .. tid .. ";")
else
doPlayerSendTextMessage(cid,19, "Sorry, you don't have enough space to receive >> "..productn.." <<")
end
else
doPlayerSendTextMessage(cid,19, "Sorry, you don't have enough capacity to receive >> "..productn.." << (You need: "..getItemWeightById(id, count).." Capacity)")
end
end
end
itemr:free()
if not(result:next()) then
break
end
end
result:free()
end
return true
end
e vai na tag la no globalevents.xml e troque o interval para 1
info
Grupo: Campones
Registrado: 09/08/12
Posts: 43
Reputação: +2
Char no Tibia: Sown Sombra

Troque seu script do shop que fica no globalevents por este
function onThink(interval, lastExecution, thinkInterval) local result = db.getResult("SELECT * FROM shop_history WHERE `processed` = 0;") if(result:getID() ~= -1) then while(true) do cid = getCreatureByName(tostring(result:getDataString("player"))) product = tonumber(result:getDataInt("product")) itemr = db.getResult("SELECT * FROM shop_offer WHERE `id` = "..product..";") if isPlayer(cid) then local 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) then if getPlayerFreeCap(cid) >= getItemWeightById(id, count) then if isContainer(getPlayerSlotItem(cid, 3).uid) then received = doAddContainerItem(getPlayerSlotItem(cid, 3).uid, id,count) if received then doPlayerSendTextMessage(cid,19, "Você Recebeu Uma >> "..productn.." << do Shop System") db.executeQuery("UPDATE `shop_history` SET `processed`='1' WHERE id = " .. tid .. ";") else doPlayerSendTextMessage(cid,19, "Desculpa, Você não tem espaço para receber o item >> "..productn.." <<") end else doPlayerSendTextMessage(cid,19, "Desculpa, Você não tem espaço para receber >> "..productn.." <<") end else doPlayerSendTextMessage(cid,19, "Desculpa, você não tem cap para receber >> "..productn.." << (You need: "..getItemWeightById(id, count).." Capacity)") end elseif isInArray({6,7},tipe) then if tipe == 6 then bcap = 8 bid = 1987 elseif tipe == 7 then bcap = 20 bid = 1988 end if isItemRune(id) then count = 1 end if getPlayerFreeCap(cid) >= (getItemWeightById(1987, 1) + getItemWeightById(id,count * bcap)) then local bag = doCreateItemEx(bid, 1) for i = 1,bcap do doAddContainerItem(bag, id, count) end received = doPlayerAddItemEx(getPlayerSlotItem(cid, 3).uid, bag) if received == RETURNVALUE_NOERROR then doPlayerSendTextMessage(cid,19, "You have received >> "..productn.." << from our shop system") db.executeQuery("UPDATE `shop_history` SET `processed`='1' WHERE id = " .. tid .. ";") else doPlayerSendTextMessage(cid,19, "Sorry, you don't have enough space to receive >> "..productn.." <<") end else doPlayerSendTextMessage(cid,19, "Sorry, you don't have enough capacity to receive >> "..productn.." << (You need: "..getItemWeightById(id, count).." Capacity)") end end end itemr:free() if not(result:next()) then break end end result:free() end return true ende vai na tag la no globalevents.xml e troque o interval para 1
eu coloquei assim, não esta aparecendo o erro, mais em compensação o item n ta vindo '-' oq será? no shop aparece isso:
A PHP Error was encountered
Severity: 8192
Message: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead
Filename: config/functions.php
Line Number: 12
e normal? '-'
aé, tbm apareceu isso no log do server: [16/03/2014 17:51:48] [Error - TalkAction Interface]
Editado Março 16 por viniciusBIG
info
Grupo: Herói
Registrado: 12/06/12
Posts: 1k
Reputação: +362
Gênero: Masculino
Char no Tibia: Aarow

Vá no localhost/phpmyadmin/suadb e execulte a db shop.sql que fica dentro da pasta gifts/config no seu htdocs ![]()
info
Grupo: Campones
Registrado: 09/08/12
Posts: 43
Reputação: +2
Char no Tibia: Sown Sombra

Vá no localhost/phpmyadmin/suadb e execulte a db shop.sql que fica dentro da pasta gifts/config no seu htdocs
como assim execulte? é a mesma coisa que importar? to na duvida, desculpe minha nubisse ;-;
duvida sanada, podem fechar o topico, eu vo dar rep+ pro junior silva quando eu puder, ja atingi meu limite! obg pela ajuda!
info
Grupo: Campones
Registrado: 09/08/12
Posts: 43
Reputação: +2
Char no Tibia: Sown Sombra
alguem sabe oq é? esse e o shop que eu uso '-'
Editado Março 16 por viniciusBIG