• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Sql syntax error

I'm not trying to make a query

when a player disconnects and connects that appears on the console
every single character when they log in AND out?

A brand new character does this?


The problem with the console error is that it gets truncated and you can't see the full error.... I've had this before, it was the result of a bug where an item that should have a sub id (like stackable items or fluid container) was null, instead of 0, so it would break saving the entire character.

Can you provide mroe information about the distro/server you're using?
 
I'm not trying to make a query

when a player disconnects and connects that appears on the console
The reason for getting this error when logging-in, is because a script executing an UPDATE statement as the character does so.

Have you recently made changes to anything related to login/logout creature events?

Yours,
 
Looks like type is empty in the query. Either in the sources when the player logs out or any new code you made for logout.

type =
 
Looks like type is empty in the query. Either in the sources when the player logs out or any new code you made for logout.

type =

It's not empty, it's a binary representation of \0001 that you can see in the syntax error. You just have to cast the value to an integer when creating the query (it's probably an uint8 now).
 
I had problem with sending values as binary representations to SQL on some old OTS engine (OTX2 or TFS 0.4) compiled on new operating system (Ubuntu 20.04). Variables were not typed properly and in new compilers there is different interpretation of 'auto type casting'.

As you can see in TFS 1.5, all uint8_t and int8_t variables (single byte 'number') are typed to uint32_t or uint16_t to tell compiler that they are numbers, not char (single byte 'letter').
Example variable typing in TFS 1.5:


EDIT:
Same problem in other thread:
Fixed by adding cast to int.
 
Last edited:
The reason for getting this error when logging-in, is because a script executing an UPDATE statement as the character does so.

Have you recently made changes to anything related to login/logout creature events?

Yours,

no, the only thing I have added is the vip system and level system in guilds
 
Back
Top