Welcome to the Achaea Forums! Please be sure to read the Forum Rules.

[MUDLET] Databases

KlendathuKlendathu Eye of the StormPosts: 2,266 @@ - Legendary Achaean
I've decided to learn how to use databases for Mudlet, so am starting with a relatively simple idea, a way to store shrine locations. I've created the database (I can see the relevant file in my profile folder), but am encountering an error when I try to db:fetch...

kln		= kln or {}
kln.db = kln.db or {}
db:create("klndb", {shrines={"divine","roomNum"}}) -- database is created
local klndb = db:get_database("klndb") -- assign database to variable name
kln.db.testAdd = function()
kln.db.testShow = function()

I don't get an error when running kln.db.testAdd() but when I try to run kln.db.testShow(), it returns the following error:

<mudlet-lua/lua/DB.lua:848: attempt to index local 'sheet' (a nil value)>

It returns the same error whether or not I'm using display(). I'm sure I've missed something trivial, but I'm falling at the first hurdle!

Tharos, the Announcer of Delos shouts, "It's near the end of the egghunt and I still haven't figured out how to pronounce Clean-dat-hoo."


Sign In to Comment.