Jump to content

XiVirtue

Members
  • Posts

    3
  • Joined

  • Last visited

Everything posted by XiVirtue

  1. I'm doing this because the pool performs more than other functions, but I'm having trouble returning early How do I use it when I export it and want to get it as a return value? Example : exports.sql:querydb("SELECT * FROM `kayitlar` WHERE `KullaniciAdi`='mahlukat'")
  2. I'm a little confused. Can you help? So how do I do it?
  3. function verileriAktar(sorgu, id) local cevap = dbPoll(sorgu, 0) -- since it's ready to poll, timeout is irrelevant and can be 0 queries[id] = cevap print("poll") --return coroutine.resume(co[id], cevap) end function querydb(str,c) if str:find("DROP TABLE") then return end local id = getFreeID() co[id] = coroutine.create(function() cevap = dbQuery(verileriAktar,{id}, connection, str) coroutine.yield() end) coroutine.resume(co[id]) if coroutine.status(co[id]) ~= "dead" then if not coroutine.running() then return id end end end local id = querydb("SELECT * FROM `kayitlar` WHERE `KullaniciAdi`='mahlukat'") print("querydb: "..tostring(id)) local result = getQueryResult(id) print("queryresult: "..tostring(result)) Occurred Debug Monitor ; print("querydb: "..tostring(id)) print("queryresult: "..tostring(result)) print("poll") I want Debug Monitor ; print("poll") print("querydb: "..tostring(id)) print("queryresult: "..tostring(result)) I want the pool value before the return, So the pool is on top.
×
×
  • Create New...