Jump to content
  • 0

Question

Posted (edited)

Yesterday i post a problem with my offline buffer sellers ,i was just forgot 1line into offlinetradetables.
NOW my problem is so AKWARD!! The code is 100% functional  !

 

I use 2databases in navicat 1 for testing and 1 clean( no1 name=test and no2 name=main server)

(*1 serverfiles with 2 databases , so the code is the same*)

Problem: In my code seller changes  name color & tittle when selling buffs(like offline shops) . & when he stop selling it return into normal.

-In my test database everything works perfect , when buffer sells automatically changes colors & tittle .Also when stop sell return everything to normal.
BUT in my main server database isn't even save the seller as result player changes name color and tittle without get back to previous (i use the same table , even with copy paste the table isn't working)

look Pics here: 
https://imgur.com/a/abSahbO.

I told you most AKWARD problem, why is that happening only in 1/2 databases ? :/ any thoughts?



i let also code pic + query of table

https://imgur.com/a/kOx2pqt

query:

 

-- ------------------------------------------
-- Table structure for sellbuff_seller_data
-- ------------------------------------------
DROP TABLE IF EXISTS `sellbuff_seller_data`;
CREATE TABLE `sellbuff_seller_data` (
  `char_obj_id` decimal(11,0) NOT NULL,
  `lastTitle` varchar(16) DEFAULT NULL,
  `lastTitleColor` varchar(8) NOT NULL,
  `lastNameColor` varchar(8) NOT NULL,
  PRIMARY KEY (`char_obj_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

Edited by Irrelevant

Recommended Posts

  • 0
Posted
7 hours ago, Irrelevant said:

well i am not sure if i get it , but .. i created an backup of test database and i ran it into main database and yes it work fine (but i cant understand why cause its the same backup just with few changes like events,test chars ,etc :/ ) i am currently delete the code and i will insert from beggining even isn't code problem,hopefully find something i missing.
*P.S.1 i also created an new database which the code work again only with "test" databases backup.
*P.S.2 i even changed the name of table in code and still the same . 

 

 

yes at code picture i add last , you can see the table code 

You are not probably looking at the right table. The thing that the code is using a specific table, doesn't mean you have to look only there. And again, does your sql query contains any 'join' word or does it run another instance of "select from where" as a parameter to run a query?

 

  • 0
Posted
4 minutes ago, wongerlt said:

maybe u have changes in other tables?

show code.

dude isnt the table, or code problem.. as you see in pics ,with same code and same table in different database it works perfectly

  • 0
Posted
Just now, Irrelevant said:

dude isnt the table, or code problem.. as you see in pics ,with same code and same table in different database it works perfectly

or just simple mistake that u didn't see.

one simple method to test just print ur mysql query and execute on ur main db via navicat.

  • 0
Posted
Just now, wongerlt said:

or just simple mistake that u didn't see.

you dont get it ... i have 2 databases  with SAME TABLES .
I USE 1 SERVERFILES ,code is the SAME! i change only db location by network.ini .

  • 0
Posted
1 minute ago, Irrelevant said:

you dont get it ... i have 2 databases  with SAME TABLES .
I USE 1 SERVERFILES ,code is the SAME! i change only db location by network.ini .

like i said test ur query via navicat in main db. maybe different mysql version? it can occur syntax errors and etc..

  • 0
Posted
3 minutes ago, wongerlt said:

like i said test ur query via navicat in main db. maybe different mysql version? it can occur syntax errors and etc..

i face that problem yesterday.

 i used the same query to create table,also created it manually .the mysql version is the same ,they are both in same localhost

  • 0
Posted (edited)
5 minutes ago, Irrelevant said:

i face that problem yesterday.

 i used the same query to create table,also created it manually .the mysql version is the same ,they are both in same localhost

in ur code print query, random example:
 

		try (Connection con = ConnectionPool.getConnection();
			PreparedStatement ps = con.prepareStatement(INSERT_MACRO))
		{
			ps.setInt(1, _owner.getObjectId());
			ps.setInt(2, macro.id);
			ps.setInt(3, macro.icon);
			ps.setString(4, macro.name);
			ps.setString(5, macro.descr);
			ps.setString(6, macro.acronym);
			ps.setString(7, sb.toString());
			ps.execute();
          System.out.println(ps); // print query to console.
		}

copy it from console and then execute in navicat in ur MAIN database. idk how explain 😄 

if u not see anything in console then something wrong in ur java code.

Edited by wongerlt
  • 0
Posted (edited)
9 minutes ago, wongerlt said:

in ur code print query, random example:
 




		try (Connection con = ConnectionPool.getConnection();
			PreparedStatement ps = con.prepareStatement(INSERT_MACRO))
		{
			ps.setInt(1, _owner.getObjectId());
			ps.setInt(2, macro.id);
			ps.setInt(3, macro.icon);
			ps.setString(4, macro.name);
			ps.setString(5, macro.descr);
			ps.setString(6, macro.acronym);
			ps.setString(7, sb.toString());
			ps.execute();
          System.out.println(ps); // print query to console.
		}

copy it from console and then execute in navicat in ur MAIN database. idk how explain 😄 

yy the code is the same,i told you that is fine. the problem is something weird!not so obvious, if that so it wouldnt work at all ,now it work in test database.

 

let me explain you further:
Imagine: that you have an functional database right? lets name it "db1", then you create an backup of db1. 
This backup you run it into a new database which named "db2" .
then you go into your serverfiles and you change only localhost location from "db1 to db2" and even so "db1" was functional "db2" is NOT .

i cant help you more to understand :/

Edited by Irrelevant
  • 0
Posted (edited)
8 minutes ago, Irrelevant said:

yy the code is the same,i told you that is fine. the problem is something weird!not so obvious, if that so it wouldnt work at all ,now it work in test database

but you tested ur query manually in navicat??? it's not weird you just didn't see mistake.

just debug every action. easy.

Edited by wongerlt
  • 0
Posted
1 minute ago, wongerlt said:

but you tested ur query manually in navicat??? it's not weird you just didn't see mistake.

yy i even wrote you that above

40 minutes ago, wongerlt said:

but you tested ur query manually in navicat??? it's not weird you just didn't see mistake.

just debug every action. easy.

watch main description. i add code response to sql pictures and my table query

  • 0
Posted
10 hours ago, Irrelevant said:

yy i even wrote you that above

watch main description. i add code response to sql pictures and my table query

did you create `procedures` in your main database? and why u use it???

  • 0
Posted

Do you use any "join" sql query ?? It seems like you have external data in your test database while at your main database you missing them. 

Guest
This topic is now closed to further replies.


  • Posts

    • Website: https://l2aurum.com/ Discord: https://discord.gg/ngaD9DJRjE   Dear Players, We are excited to announce that the x300 Summer Season Beta server will open on 19‑06‑2026 at 20:00 GMT+2. As previously mentioned, there will be no wipe and no account deletion. All accounts, characters, items, and progress from Season 1 will remain completely safe. To ensure a fair and competitive start for new players, all Season 1 accounts will be temporarily locked. The official Summer Season launch will take place on 26‑06‑2026 at 20:00 GMT+2. A few weeks after the official launch, Season 1 accounts will be unlocked so previous players can access their characters and continue their journey. This approach allows new players to enjoy a fresh start while preserving the progress and achievements of our long-term community. Thank you for your continued support, and we look forward to welcoming everyone to the new Summer Season. L2Aurum Team   Explore L2 Aurum Features Discover the Enhancements that set us apart!   Information Server Version: Interlude - PvP Server Client Interface: Unique Interface   Rates     Additional Features and changes When you create a new character, you will start in Giran Harbor at Level 1, equipped with full No-Grade items. Auto Farm is available for free for 2 hour daily without VIP. VIP players receive 4 hours of Auto Farm per day. The Auto Farm time resets with the server restart at 5:30 AM. Status Noblesse: Last hit Barakiel. Player Spawn Protection: 7 seconds. Geodata + Pathnodes: Enabled. All commands are available in the Community Board. Maximum 3 Bishops Per Party: Enabled. Boss Protect - Anti-Zerg: Enabled. Shift + click on monsters to see the droplist. Offline shop. Mana Potion Restores 1000 MP with a cooldown of 8 seconds. Inventory Slots: 250.   Weapon Information Lv1 Black Chaotic Weapons. Lv2 Aurum Weapons.   Armor Information Lv1 Blue Apella Armor. Lv2 Aurum Apella Armor. Misc additions Accessories +50 and +150 pdef|mdef. Tattoos: Resolve | Soul | Avadon. Agathions: Cosmetic only (no stats).   Buffs / Dances / Songs / Prophecies Duration: 2 hours. Total Buff Slots: 32 + 4 (Divine Inspiration). Vote Buff: You must vote on 3 of 6 vote sites to get the vote buff blessing. Castle Reward Every clan that captures a castle receives the castle owner clan blessing buff. To receive it, the clan leader must be online.   Events   Raid Bosses Epic Bosses Final Bosses     For full server information please visit website PvP: Server Features   Website: https://l2aurum.com/ Discord: https://discord.gg/ngaD9DJRjE      
  • Topics

×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..