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

znote createchar

sierra

New Member
Joined
Aug 26, 2007
Messages
52
Reaction score
1
Location
New Zealand
hey all I got Znote's latest sources for the website as I was testing out the website and went to create a char I get this sql error on the webpage can anyone help me out on this please.

1string(607) "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`, `lastlogout`, `blessings`, `balance`) VALUES ('Test', '1', '1', '8', '4', '185', '185', '4200', '68', '76', '78', '58', '128', '0', '0', '40', '40', '0', '100', '7', '255', '255', '7', '', '470', '1', '0', '-1062731512', '1', '0', '0', '0', '0', '0');"
(query - SQL error)
Type: voidQuery (voidQuery is used for update, insert or delete from database)

Out of range value for column 'lastip' at row 1
 
When a column is assigned a datatype of unsgined the value stored in it must not be negative.
That is what the out of range error (in this case) means.

Using tfs 1.2 sql schema as an example:
Code:
`lastlogout` bigint(20) unsigned NOT NULL DEFAULT '0',
 
ok so how would I fix this error for lastip
re do the website database and write it in as a 0 or something? or is there a quicker way and easier way?
 
This website is hosted on your pc right? I had this issue too.
The 'lastip' column cannot have '' inserted into it. ( the 11th last parameter in your insert statement I believe).

When your connecting to the website that's hosted locally the getIP() function (in the create player php file) returns nothing for some reason (when i hosted my website on the cloud this problem disappeared). You can edit this file to insert 0 instead of getIP() while testing locally before you host the site elsewhere.
 
I couldn't work out how to make it import as 0 so made it into another time() and that worked ill be running server from home trying to fix as many things as I can before I put it up thanx for the help @Nazubal27
 
Back
Top