offline traders problem
Forum rules
READ NOW: L2j Forums Rules of Conduct
READ NOW: L2j Forums Rules of Conduct
-
- L2j Veteran
- Posts: 967
- Joined: Sun Mar 11, 2007 7:49 pm
- Location: Ukraine
Re: offline traders problem
stm_items.setInt(2, i.getObjectId()); ?
-
- Posts: 17
- Joined: Thu Jan 13, 2011 1:40 am
Re: offline traders problem
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. :-/
I'm new to Java, didn't even think about that. PHP has spoiled me. :-/
- JIV
- L2j Veteran
- Posts: 1882
- Joined: Sun Jan 06, 2008 8:17 pm
- Location: Slovakia
- Contact:
Re: offline traders problem
WRONGSolace wrote:Doh! setShort() ought to be used instead of setInt(). Nonetheless, the SQL update without the code update causes problems.
-
- Posts: 1160
- Joined: Thu Aug 30, 2007 5:17 pm
Re: offline traders problem
lolSolace 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. :-/
-
- Posts: 17
- Joined: Thu Jan 13, 2011 1:40 am
Re: offline traders problem
>.< 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.

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.

- JIV
- L2j Veteran
- Posts: 1882
- Joined: Sun Jan 06, 2008 8:17 pm
- Location: Slovakia
- Contact:
Re: offline traders problem
there is no error in core, but you are close.
-
- Posts: 458
- Joined: Fri Oct 05, 2007 1:29 am
Re: offline traders problem
server shutdown `item` int(10) UNSIGNED NOT NULL DEFAULT '0'
server started `item` smallint(5) unsigned NOT NULL DEFAULT '0'
?
server started `item` smallint(5) unsigned NOT NULL DEFAULT '0'
?
- MELERIX
- L2j Veteran
- Posts: 6667
- Joined: Sat Sep 23, 2006 11:31 pm
- Location: Chile
- Contact:
Re: offline traders problem
well, if `item` column is used for objectId instead of itemId
then this should fix the issue...
bu if not this... dunno where is the issue.
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
-
- Posts: 17
- Joined: Thu Jan 13, 2011 1:40 am
Re: offline traders problem
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...
- JIV
- L2j Veteran
- Posts: 1882
- Joined: Sun Jan 06, 2008 8:17 pm
- Location: Slovakia
- Contact:
Re: offline traders problem
It was quite simple after checking save code but only who was able to understand WHY int is needed are L2j devs.
-
- Posts: 458
- Joined: Fri Oct 05, 2007 1:29 am
Re: offline traders problem
with smallint you can asign only +- 31627 value but for int 2147483647
since "we have Error while saving offline trader: 268930501" we need int
since "we have Error while saving offline trader: 268930501" we need int
- goncafa
- Posts: 385
- Joined: Thu Aug 05, 2010 2:10 pm
- Location: Santiago, Chile
Re: offline traders problem
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.

PS: im sorry my bad english.

- jurchiks
- Posts: 6769
- Joined: Sat Sep 19, 2009 4:16 pm
- Location: Eastern Europe
Re: offline traders problem
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.
@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.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.
-
- L2j Veteran
- Posts: 967
- Joined: Sun Mar 11, 2007 7:49 pm
- Location: Ukraine
Re: offline traders problem
i delete you comments, because you write even don't start think, if you don't think - then don't post that.
- jurchiks
- Posts: 6769
- Joined: Sat Sep 19, 2009 4:16 pm
- Location: Eastern Europe
Re: offline traders problem
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.
Otherwise you will never learn anything if all you do is copy-paste!
Discussion breeds innovation.