I have a series of scripts set up for storing information about the areas I visit in Aardwolf into a database. Up until recently, these scripts have functioned exactly as they should, but now I'm getting an error message any time a particular function attempts to add information to the database. No idea what could have changed, to be perfectly honest. I haven't altered the scripts for those functions at all. The error message in particular is "LuaSQL: SQL logic error or missing database".
I double-checked, and the database file is definitely still present. I was having a similar problem with another database that I couldn't write to (though I didn't check the error message - wasn't aware that I could at the time) that I ended up solving by deleting the database and starting over. Been working fine since. This database, however, I'm a bit more attached to and would really rather fix whatever the problem is rather than give up on it. Any ideas?
I've attached the database, if it helps at all.
Error when attempting to add to a database
Error when attempting to add to a database
- Attachments
-
- Database_mapperdb.db
- the troubled database
- (20 KiB) Downloaded 284 times
Re: Error when attempting to add to a database
Okay, I messed around with it some more, and it seems it's only certain areas (possibly only one?) that aren't being added successfully to the database. It's working perfectly fine with other areas still. No differences that I can tell between the area I'm having problems with and the other areas.
Schema for the sheet:
Schema for the sheet:
Code snippet being used to add to the database:
I'm leaning a bit more towards the possibility there's an issue with my code, but what could it be if almost every other area's working fine?
- SlySven
- Posts: 1023
- Joined: Mon Mar 04, 2013 3:40 pm
- Location: Deepest Wiltshire, UK
- Discord: SlySven#2703
Re: Error when attempting to add to a database
How recent is your code? There have been some recent changes (in preview "-delta" I think) to enforce uniqueness in area names in the Mudlet map data where there were some circumstances previously that could permit duplicate (or empty) Area names (which actually breaks some of the code). That being the case there might be problems if the database tries to refer to areas that are rejected now by the map code - look for error message in the main console are the map is loaded as these issues are "fixed" (with "_001", "_002"... type suffixes or "Unnamed Area", "Unnamed Area_001"... new names) I am not saying this is your problem, but it might have a bearing...
Re: Error when attempting to add to a database
This is using a SQLite database, not the mudlet mapper database.
- SlySven
- Posts: 1023
- Joined: Mon Mar 04, 2013 3:40 pm
- Location: Deepest Wiltshire, UK
- Discord: SlySven#2703
Re: Error when attempting to add to a database
Yeah, I spotted that but I was just tossing in the idea that if any database validation or other related code was being using to verify the areas against the Mudlet Mapper database it might now fail when doing that.