Page 2 of 3
Re: offline traders problem
Posted: Sun Jan 16, 2011 5:22 pm
by lion
stm_items.setInt(2, i.getObjectId()); ?
Re: offline traders problem
Posted: Sun Jan 16, 2011 10:16 pm
by Solace
Doh! setShort() ought to be used instead of setInt(). Nonetheless, the SQL update without the code update causes problems.
I'm new to Java, didn't even think about that. PHP has spoiled me. :-/
Re: offline traders problem
Posted: Sun Jan 16, 2011 10:57 pm
by JIV
Solace wrote:Doh! setShort() ought to be used instead of setInt(). Nonetheless, the SQL update without the code update causes problems.
WRONG
Re: offline traders problem
Posted: Sun Jan 16, 2011 11:20 pm
by hope
Solace wrote:Doh! setShort() ought to be used instead of setInt(). Nonetheless, the SQL update without the code update causes problems.
I'm new to Java, didn't even think about that. PHP has spoiled me. :-/
lol
Re: offline traders problem
Posted: Mon Jan 17, 2011 12:23 am
by Solace
>.< Not funny hope!
Erm, is it because you're storing the object's id instead of the item's id in the database?
Should you be using: stm_items.setInt(2, i.getItem().getItemId());
Instead of: stm_items.setInt(2, i.getObjectId());
I think this is what lion was meaning; though I could, very well, be wrong again. lol I'm trying to learn.

Re: offline traders problem
Posted: Mon Jan 17, 2011 12:43 am
by JIV
there is no error in core, but you are close.
Re: offline traders problem
Posted: Mon Jan 17, 2011 1:13 am
by blacksea
server shutdown `item` int(10) UNSIGNED NOT NULL DEFAULT '0'
server started `item` smallint(5) unsigned NOT NULL DEFAULT '0'
?
Re: offline traders problem
Posted: Mon Jan 17, 2011 2:00 am
by MELERIX
well, if
`item` column is used for
objectId instead of
itemId
then this should fix the issue...
Code: Select all
### Eclipse Workspace Patch 1.0#P datapack_developmentIndex: sql/character_offline_trade_items.sql===================================================================--- sql/character_offline_trade_items.sql (revision 7750)+++ sql/character_offline_trade_items.sql (working copy)@@ -1,6 +1,6 @@ CREATE TABLE IF NOT EXISTS `character_offline_trade_items` ( `charId` int(10) unsigned NOT NULL DEFAULT '0',- `item` smallint(5) unsigned NOT NULL DEFAULT '0',+ `item` int(10) unsigned NOT NULL DEFAULT '0', `count` bigint(20) unsigned NOT NULL DEFAULT '0', `price` bigint(20) unsigned NOT NULL DEFAULT '0' );\ No newline at end of fileIndex: sql/updates/20110112update.sql===================================================================--- sql/updates/20110112update.sql (revision 7750)+++ sql/updates/20110112update.sql (working copy)@@ -1,6 +1,6 @@ ALTER TABLE `character_offline_trade_items` MODIFY `charId` int(10) unsigned NOT NULL DEFAULT '0',-MODIFY `item` smallint(5) unsigned NOT NULL DEFAULT '0',+MODIFY `item` int(10) unsigned NOT NULL DEFAULT '0', MODIFY `count` bigint(20) unsigned NOT NULL DEFAULT '0', MODIFY `price` bigint(20) unsigned NOT NULL DEFAULT '0', DROP PRIMARY KEY;\ No newline at end of file
bu if not this... dunno where is the issue.
Re: offline traders problem
Posted: Mon Jan 17, 2011 5:09 am
by Solace
MELERIX, that is what I initially posted. And it does fix the problem; however, JIV apparently sees another (bigger) underlying problem that we've all yet to guess correctly...
Re: offline traders problem
Posted: Mon Jan 17, 2011 10:56 am
by JIV
It was quite simple after checking save code but only who was able to understand WHY int is needed are L2j devs.
Re: offline traders problem
Posted: Mon Jan 17, 2011 12:51 pm
by blacksea
with smallint you can asign only +- 31627 value but for int 2147483647
since "we have Error while saving offline trader: 268930501" we need int
Re: offline traders problem
Posted: Mon Jan 17, 2011 1:44 pm
by goncafa
i have not any custom item, and the problem is onlu whith seller trader offline, becouse all offline crafters and buyes trader offline are restored well, but sellers has been missed.
Re: offline traders problem
Posted: Mon Jan 17, 2011 2:14 pm
by jurchiks
Deleting comments, huh? How cool of mods. But, of course, you are ALWAYS right...
@JIV - instead of acting all cool you could have simply committed the fix if you knew where the problem is. Now you're just acting like a douche.
Re: offline traders problem
Posted: Mon Jan 17, 2011 4:12 pm
by lion
i delete you comments, because you write even don't start think, if you don't think - then don't post that.
Re: offline traders problem
Posted: Mon Jan 17, 2011 4:22 pm
by jurchiks
Those were my thoughts I wrote. It wasn't even anything offensive, not by my book at least.