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

[Powergamers] SQL error: "MYSQL ERROR: BIGINT UNSIGNED value is out of range" (1690)

ligus

New Member
Joined
Apr 26, 2010
Messages
253
Reaction score
0
Hello, I'm trying to use this script: http://otland.net/threads/gesior-acc-maker-tfs-0-3-5-powergamers-and-online-time-stats.44762/
But there is problem with this line:
Code:
db.executeQuery("UPDATE `players` SET `exphist7`=players.exphist6, `exphist6`=players.exphist5, `exphist5`=players.exphist4, `exphist4`=players.exphist3, `exphist3`=players.exphist2, `exphist2`=players.exphist1, `exphist1`=players.experience-players.exphist_lastexp, `exphist_lastexp`=players.experience;")

I have these errors:
Code:
mysql_real_query(): UPDATE `players` SET 
`exphist7`=players.exphist6, `exphist6`=players.exphist5, `exphist5`=players.exphist4,
`exphist4`=players.exphist3, `exphist3`=players.exphist2, `exphist2`=players.exphist1, 
`exphist1`= players.experience-players.exphist_lastexp, `exphist_lastexp`=players.experience; 
- MYSQL ERROR: BIGINT UNSIGNED value is out of range in 
'(`ot`.`players`.`experience` - `ot`.`players`.`exphist_lastexp`)' (1690)

I've changed column exphist_lastexp in DB - I've set attribute Unsigned but it haven't helped.
How can it be fixed?
 
The value in braces does not change anything, if you change it it unsinged it might help if there is really a value to big.

Check what the result of this is:
Code:
SELECT * FROM players WHERE exphist_lastexp > experience;
 
Code:
"UPDATE `players` SET `exphist7`=`exphist6`, `exphist6`=`exphist5`, `exphist5`=`exphist4`, `exphist4`=`exphist3`, `exphist3`=`exphist2`, `exphist2`=`exphist1`, `exphist1`= cast(`experience` as signed) - `exphist_lastexp`, `exphist_lastexp`=`experience`;"
 
:rolleyes: :mog: :troll: you have to do is open your database and give you a kick of my part xD:p do not just kidding. :troll: ,try testing with a new database as a test, and if all goes well then your database is obsolete:rolleyes: *@summ i love you heart just kidding smilie_lol.gif
 
The value in braces does not change anything, if you change it it unsinged it might help if there is really a value to big.

Check what the result of this is:
Code:
SELECT * FROM players WHERE exphist_lastexp > experience;

I did
Code:
SELECT experience,exphist_lastexp FROM players WHERE exphist_lastexp>experience;

Result:
Code:
`players` (`experience`, `exphist_lastexp`) VALUES
(163963473,  279644100),
(472600561,  477569200),
(66792337,    143604040);


Code:
"UPDATE `players` SET `exphist7`=`exphist6`, `exphist6`=`exphist5`, `exphist5`=`exphist4`, `exphist4`=`exphist3`, `exphist3`=`exphist2`, `exphist2`=`exphist1`, `exphist1`= cast(`experience` as signed) - `exphist_lastexp`, `exphist_lastexp`=`experience`;"

Going test it :)




EDIT
The same problem:
Code:
mysql_real_query(): UPDATE `players` SET `exphist7`=`exphist6`, `exphist6`=`exphist5`, `exphist5`=`exphist4`, `exph
ist4`=`exphist3`, `exphist3`=`exphist2`, `exphist2`=`exphist1`, `exphist1`= cast(`experience` as signed) - `exphist_lastexp`, `exp
hist_lastexp`=`experience`; - MYSQL ERROR: BIGINT UNSIGNED value is out of range in '(cast(`ot`.`players`.`experience` as signed
) - `ot`.`players`.`exphist_lastexp`)' (1690)
 
Anybody experience a server crash because of this script?

Or is it even possible that this script could crash the server?
 
Back
Top