LE

[Duvida] Globalevents, Error

Por Leandrinhow, 13 de mar. de 2012 em Archived

error na tag
script
6
740
LeandrinhowL
13 de março de 2012 às 13:27

globalevent name="record" type="record" event="script" value="record.lua"/> éssa éa tag

 

script:

 

function onRecord(current, old, cid)

db.executeQuery("INSERT INTO `server_record` (`record`, `world_id`, `timestamp`) VALUES (" .. current .. ", " .. getConfigValue('worldId') .. ", " .. os.time() .. ");")

addEvent(doBroadcastMessage, 150, "New record: " .. current .. " players are logged in.", MESSAGE_STATUS_DEFAULT)

end

 

 

Imagem do error:

 

errorhp.png

 

Preciso de resposta rápida, isso acontece quando bate o record de players no servidor :)

+REP pra quem ajudar !

Editado Março 13 por Leandrinhow

VodkartV
13 de março de 2012 às 13:45
function onRecord(current, old, cid)
db.query("INSERT INTO `server_record` (`record`, `world_id`, `timestamp`) VALUES (" .. current .. ", " .. getConfigValue('worldId') .. ", " .. os.time() .. ");")
addEvent(doBroadcastMessage, 150, "New record: " .. current .. " players are logged in.", MESSAGE_STATUS_DEFAULT)
end

LeandrinhowL
13 de março de 2012 às 17:24

o error persiste :( ;S

 

 

semttulolgz.png

VodkartV
13 de março de 2012 às 17:38
function onRecord(current, old, cid)
db.escapeString("INSERT INTO `server_record` (`record`, `world_id`, `timestamp`) VALUES (" .. current .. ", " .. getConfigValue('worldId') .. ", " .. os.time() .. ");")
addEvent(doBroadcastMessage, 150, "New record: " .. current .. " players are logged in.", MESSAGE_STATUS_DEFAULT)
end

CoLoRaDoC
13 de março de 2012 às 17:49

se não der certo tente assim:

 

function onRecord(current, old, cid)
db.Query("INSERT INTO `server_record` (`record`, `world_id`, `timestamp`) VALUES (" .. current .. ", " .. getConfigValue('worldId') .. ", " .. os.time() .. ");")
addEvent(doBroadcastMessage, 150, "New record: " .. current .. " players are logged in.", MESSAGE_STATUS_DEFAULT)
end

Editado Março 15 por ADM_Forever

LeandrinhowL
16 de março de 2012 às 19:37

@ADM_Forever

 

o do vodkart deu certo, msm assim obg.

 

Dúvida Sanada