Lua syntax error:../mudlet-lua/lua/DB.lua:445: bad argument #1 to 'pairs' (table expected, got string)
ak = ak or {}
ak.schema = {
oppclass = {
rank = 0,
aff = "",
probability = 100,
_unique = {"rank"},
_violations = "REPLACE",
},
_unique = {"oppclass"},
_violations = "REPLACE",
}
function ak.init()
ak.db = db:create("akat", ak.schema)
db.__conn["akat"]:execute("pragma synchronous = OFF")
end
ak.init() --create the database
The line that's erroring is:
ak.db = db:create("akat", ak.schema)
Any help would be appreciated as this is a whole new area for me.
Comments
Svof
Mudlet Discord join up