Weird SQL error

whoward69

DLL Minion
Joined
May 30, 2011
Messages
8,727
Location
Near Portsmouth, UK
Code:
no such column: Type
In Query - select * from Notifications where Type = ? LIMIT 1

Now I know for a fact that that line (or anything remotely like it) does not exist in any of my mods - so what could be causing it?

I'm missing something obvious, it just I've looked at so much code in the last 2 weeks that I've gone "code blind" so any help as to what non-SQL to look for gratefully received

W
 
I checked the database, and there is no such column as Type in Notifications. There is NotificationType instead :)
 
Sorry, wasn't clear, I know its NotificationType in the Notifications table (and not Type), what I can't work out is what line of code is generating that SQL statement as the SQL does not appear in any of my mods.

Another case where the error message is really unhelpful (like the truncated file names) as what I really need to know is the value being substituted for the ? in the stmt.

Oh well, back to binary chopping files.
 
It's being caused the first time the line

Code:
GameInfo.Notifications[i].NotificationType

is executed (even though i is never a string always an int)

So I'm guessing that the GameInfo tables are lazily constructed and the first time you access Notifications that way it ""barfs" as it can't find the Type field in the table to construct the accessor function to do future possible "by type" lookups.
 
I get these quite a lot as I have several custom static tables in my mod.

Most likely cause is a rogue cursor or missing bracket/quote which has caused a SQL line to go haywire.
 
Most likely cause is a rogue cursor or missing bracket/quote which has caused a SQL line to go haywire.

To repeat, that SQL line (or anything like it) DOES NOT OCCUR IN ANY OF MY MODS, so it cannot be a misplaced anything.

The error message in the Database.log file *IS* being generated by that line of Lua, which points to an interesting bug in the core DLL.
 
Back
Top Bottom