• Hail, we're RedGuides. We want you to play six (yes, 6!) EverQuest characters at once. We have scripts and a friendly community to help, please join our playstyle and say hello! 👋
  • We've added LLM sections to our Terms & Rules and Resource Rules, for everyone's sanity & in-game safety.
    Read more
    a. Do not replace your voice with an LLM. This goes for your posts and your scripts. Drafting and editing with a tool is fine, but don't take you out of what you share.
    b. Do not replace your EQ character's voice with an LLM. We don't want scripts that speak over /ooc, /shout or other public channels. This has been an unwritten rule that's kept casino scripts off the site for decades, but we're now compelled to make it clear: keep automated communication private.

    Why Does RG Review Scripts?
    Nearly every LLM-written Lua script we see is making your character do impossible things, and rarely in a way that's beneficial to you. We've seen heavy server hammering, /target over impossible distances when /nav spawn would passively accomplish the same thing, a spawn search that fires 20+ times per second, and other pointless actions that are likely annoying GMs.

    You are welcome to use LLMs as a tool to structure, draft, and edit your work, but please read critically before hitting /lua run

Problem - database is locked

Trying to use lsqlite3 every now and then I get a "database is locked".

Code:
local SQL = require('lsqlite3')
local DB = SQL.open(cooldb)


if DB:isopen() then
     local MeQ = "SELECT * FROM Dets WHERE Name = '" .. MyName .. "'"
     for X in DB:urows(MeQ) do
          HaveRow = true
          DBDet = X.DetStat
          break
     end
end

is there anything I can do to either 1, prevent it from locking, or 2 check and see if it is locked before continuing on?

Thanks for the help!
 
Trying to use lsqlite3 every now and then I get a "database is locked".

Code:
local SQL = require('lsqlite3')
local DB = SQL.open(cooldb)


if DB:isopen() then
     local MeQ = "SELECT * FROM Dets WHERE Name = '" .. MyName .. "'"
     for X in DB:urows(MeQ) do
          HaveRow = true
          DBDet = X.DetStat
          break
     end
end

is there anything I can do to either 1, prevent it from locking, or 2 check and see if it is locked before continuing on?

Thanks for the help!
Do you have multiple scripts trying to access the same database? Multiple characters running the same script trying to do so?

Code:
local dbn = sqlite3.open(mq.luaDir .. '\\epiclaziness\\epiclaziness.db')

    local sql = "SELECT * FROM " .. tablename
    for a in dbn:nrows(sql) do
        table.insert(task_table, a)
    end

is what I use with lsqlite3 and have had no issues
 
Do you have multiple scripts trying to access the same database? Multiple characters running the same script trying to do so?

Code:
local dbn = sqlite3.open(mq.luaDir .. '\\epiclaziness\\epiclaziness.db')

    local sql = "SELECT * FROM " .. tablename
    for a in dbn:nrows(sql) do
        table.insert(task_table, a)
    end

is what I use with lsqlite3 and have had no issues
Yes, mulitple scripts trying to open the same DB with the same script.

Tried using numros instead of urows.. was getting the same thing.

wierd.. wonder where i am screwing it up lol.. been kicking my @#$
 
Yes, mulitple scripts trying to open the same DB with the same script.

Tried using numros instead of urows.. was getting the same thing.

wierd.. wonder where i am screwing it up lol.. been kicking my @#$

I've not played with having multiple things accessing the database at once. Best I can offer is to throw you this link: https://sqldocs.org/sqlite/sqlite-database-is-locked/
Hopefully someone else can help you a bit more!
 
Problem - database is locked

Users who are viewing this thread

Back
Top
Cart