offline traders problem

Support for the latest build of L2J Server, get help here with installations, upgrades, problems.
Do not post bugs reports here, use viewforum.php?f=77 instead.
There is no support for other server builds than the official provided by l2jserver.com
Forum rules
READ NOW: L2j Forums Rules of Conduct
lion
L2j Veteran
L2j Veteran
Posts: 967
Joined: Sun Mar 11, 2007 7:49 pm
Location: Ukraine

Re: offline traders problem

Post by lion »

stm_items.setInt(2, i.getObjectId()); ?
Solace
Posts: 17
Joined: Thu Jan 13, 2011 1:40 am

Re: offline traders problem

Post 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. :-/
User avatar
JIV
L2j Veteran
L2j Veteran
Posts: 1882
Joined: Sun Jan 06, 2008 8:17 pm
Location: Slovakia
Contact:

Re: offline traders problem

Post by JIV »

Solace wrote:Doh! setShort() ought to be used instead of setInt(). Nonetheless, the SQL update without the code update causes problems.
WRONG
hope
Posts: 1160
Joined: Thu Aug 30, 2007 5:17 pm

Re: offline traders problem

Post 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
Solace
Posts: 17
Joined: Thu Jan 13, 2011 1:40 am

Re: offline traders problem

Post 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. :P
User avatar
JIV
L2j Veteran
L2j Veteran
Posts: 1882
Joined: Sun Jan 06, 2008 8:17 pm
Location: Slovakia
Contact:

Re: offline traders problem

Post by JIV »

there is no error in core, but you are close.
blacksea
Posts: 458
Joined: Fri Oct 05, 2007 1:29 am

Re: offline traders problem

Post by blacksea »

server shutdown `item` int(10) UNSIGNED NOT NULL DEFAULT '0'
server started `item` smallint(5) unsigned NOT NULL DEFAULT '0'
?
User avatar
MELERIX
L2j Veteran
L2j Veteran
Posts: 6667
Joined: Sat Sep 23, 2006 11:31 pm
Location: Chile
Contact:

Re: offline traders problem

Post 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.
Solace
Posts: 17
Joined: Thu Jan 13, 2011 1:40 am

Re: offline traders problem

Post 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...
User avatar
JIV
L2j Veteran
L2j Veteran
Posts: 1882
Joined: Sun Jan 06, 2008 8:17 pm
Location: Slovakia
Contact:

Re: offline traders problem

Post by JIV »

It was quite simple after checking save code but only who was able to understand WHY int is needed are L2j devs.
blacksea
Posts: 458
Joined: Fri Oct 05, 2007 1:29 am

Re: offline traders problem

Post 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
User avatar
goncafa
Posts: 385
Joined: Thu Aug 05, 2010 2:10 pm
Location: Santiago, Chile

Re: offline traders problem

Post 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.
Best Regards

PS: im sorry my bad english.
Image
User avatar
jurchiks
Posts: 6769
Joined: Sat Sep 19, 2009 4:16 pm
Location: Eastern Europe

Re: offline traders problem

Post 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.
If you have problems, FIRST TRY SOLVING THEM YOURSELF, and if you get errors, TRY TO ANALYZE THEM, and ONLY if you can't help it, THEN ask here.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.
lion
L2j Veteran
L2j Veteran
Posts: 967
Joined: Sun Mar 11, 2007 7:49 pm
Location: Ukraine

Re: offline traders problem

Post by lion »

i delete you comments, because you write even don't start think, if you don't think - then don't post that.
User avatar
jurchiks
Posts: 6769
Joined: Sat Sep 19, 2009 4:16 pm
Location: Eastern Europe

Re: offline traders problem

Post by jurchiks »

Those were my thoughts I wrote. It wasn't even anything offensive, not by my book at least.
If you have problems, FIRST TRY SOLVING THEM YOURSELF, and if you get errors, TRY TO ANALYZE THEM, and ONLY if you can't help it, THEN ask here.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.
Post Reply