• 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!

error when trying to create a character

failkin

Member
Joined
May 10, 2021
Messages
25
Solutions
1
Reaction score
9
I do apologize this is my first time attempting anything like this but whenever i use the guide to make my own server i get up to character creation and get this error.

string(754) "INSERT INTO players(name, group_id, account_id, level, vocation, health, healthmax, experience, lookbody, lookfeet, lookhead, looklegs, looktype, lookaddons, maglevel, mana, manamax, manaspent, soul, town_id, posx, posy, posz, conditions, cap, sex, lastlogin, lastip, save, skull, skulltime, rank_id, guildnick, lastlogout, blessings, direction, loss_experience, loss_mana, loss_skills, premend, online, balance) VALUES ('Testfail', '1', '1', '8', '1', '185', '185', '4200', '68', '76', '78', '58', '128', '0', '0', '40', '40', '0', '100', '11', '5', '5', '2', '', '470', '1', '0', '2130706433', '1', '0', '0', '0', '', '0', '0', '0', '10', '10', '10', '0', '0', '0');"
(query - SQL error)
Type: voidQuery (voidQuery is used for update, insert or delete from database)

Unknown column 'rank_id' in 'field list'

this is the guide im currently using tsf 1.2

any help would be much appreciated ive tried all the suggestions on other similar threads such as increasing stack count to 512k and i even copied and pasted the character part of config from another thread and neither worked.
 
Solution
Are you hosting it in Windows or Ubuntu? So far in windows i haven't found problems because the default sql_mode into the mysql works fine, but in Ubuntu or MAC you will get that error because it have different sql_mode by default, so you're trying to insert into 'conditions' and 'lastlogout' no values at all ('') in that query you posted above.
You can check what is your current sql mode running this query
Lua:
SHOW VARIABLES LIKE 'sql_mode';
.
And so you can check if that's the error by running this query and testing your website again
Code:
SET GLOBAL sql_mode=''
, problem is it won't change the sql_mode permamently.
To change it permanently, at least in Ubuntu, you can modify it going to the directory opt/lampp/etc/ and opening...
I found the players table and its a whoooole lot of nulls I'm assuming there's supposed to be information there?
 
Are you hosting it in Windows or Ubuntu? So far in windows i haven't found problems because the default sql_mode into the mysql works fine, but in Ubuntu or MAC you will get that error because it have different sql_mode by default, so you're trying to insert into 'conditions' and 'lastlogout' no values at all ('') in that query you posted above.
You can check what is your current sql mode running this query
Lua:
SHOW VARIABLES LIKE 'sql_mode';
.
And so you can check if that's the error by running this query and testing your website again
Code:
SET GLOBAL sql_mode=''
, problem is it won't change the sql_mode permamently.
To change it permanently, at least in Ubuntu, you can modify it going to the directory opt/lampp/etc/ and opening the file my.cnf, then edit it and add
Code:
sql_mode=''
below the [mysql] part, like this:

Code:
[mysql]
sql_mode=''

I don't know how to change it in Windows, although it should be easier i guess.

The second error is probably because the column rank_id doesn't exist in the database. I recommend you to check if the distro you setted in your config file of the website is the same than the version of your server.
 
Are you hosting it in Windows or Ubuntu? So far in windows i haven't found problems because the default sql_mode into the mysql works fine, but in Ubuntu or MAC you will get that error because it have different sql_mode by default, so you're trying to insert into 'conditions' and 'lastlogout' no values at all ('') in that query you posted above.
You can check what is your current sql mode running this query
Lua:
SHOW VARIABLES LIKE 'sql_mode';
.
And so you can check if that's the error by running this query and testing your website again
Code:
SET GLOBAL sql_mode=''
, problem is it won't change the sql_mode permamently.
To change it permanently, at least in Ubuntu, you can modify it going to the directory opt/lampp/etc/ and opening the file my.cnf, then edit it and add
Code:
sql_mode=''
below the [mysql] part, like this:

Code:
[mysql]
sql_mode=''

I don't know how to change it in Windows, although it should be easier i guess.

The second error is probably because the column rank_id doesn't exist in the database. I recommend you to check if the distro you setted in your config file of the website is the same than the version of your server.
sorry for the slow reply my daughter came down with some kinda of bug been distracted. Had a friend who was knowledgeable on such things look at it i messed up the config file i put .2 instead of 10 for 1.2. Sorry folks as i said its my first time even trying something related to this lol.
 
Solution
Back
Top