Ir para conteúdo
  • 0

Erro no record.lua


CreedMohammed

Pergunta

[Error - Globalevents Interface]
data/globalevents/scripts.start.lua
Description
data/globalevents/scripts/start.lua:1: attempt to call field 'executeQuery' <a nill value>
[Warning - Event::loadScript] Cannot load script <data/glovalevents/scripts/start.lua>
cannot open data/globalevents/scripts/record.lua: No such file or directory

 

Como arrumo isso?

Link para o comentário
Compartilhar em outros sites

5 respostass a esta questão

Posts Recomendados

  • 0
<?xml version="1.0" encoding="UTF-8"?>
<globalevents>

<globalevent name="save" interval="2000000" event="script" value="save.lua"/>

<globalevent name="clean" interval="9950000" event="script" value="clean.lua"/>


<globalevent name="start" type="start" event="script" value="start.lua"/>

<globalevent name="record" type="record" event="script" value="record.lua"/>



<globalevent name="info" interval="1000000" script="info.lua"/>


<globalevent name="info2" interval="1500000" script="info2.lua"/>

<globalevent name="info3" interval="2000000" script="info3.lua"/>

<globalevent name="info4" interval="2500000" script="info4.lua"/>

<globalevent name="animatedtext" interval="3000" script="texto.lua"/>
<globalevent name="magiceffect" interval="3000" script="placa.lua"/>
<globalevent name="magiceffect1" interval="3000" script="placa2.lua"/>
<globalevent name="magiceffect2" interval="3000" script="placa3.lua"/>
<globalevent name="magiceffect3" interval="3000" script="placa4.lua"/>
<globalevent name="playersrecord" type="record" event="script" value="record.lua"/>


</globalevents>

Link para o comentário
Compartilhar em outros sites

  • 0

Na pasta data/globalevents/scripts, crie um arquivo chamado record.lua e adicione isso dentro:

 

 

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

 

 

 

Editado por Roksas
Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...