L2JMobius

C6 TradeController

caioconc · 9 · 6644

Offline caioconc

  • Heir
  • **
    • Posts: 33
When starting the server this happens!

https://imgur.com/imYvWil


Code: [Select]
protected void dataTimerSave(int time)
{
final long timerSave = System.currentTimeMillis() + (time * 60 * 60 * 1000);
try (Connection con = DatabaseFactory.getConnection())
{
final PreparedStatement statement = con.prepareStatement("UPDATE merchant_buylists SET savetimer =? WHERE time =?");
statement.setLong(1, timerSave);
statement.setInt(2, time);
statement.executeUpdate();
statement.close();
}
catch (Exception e)
{
LOGGER.warning("TradeController: Could not update Timer save in Buylist");
}
}


Online G-hamsteR

  • Viscount
  • *****
    • Posts: 335
I'm not having the same problem. Did you modify anything in your buylists?


Online Mobius

  • Distinguished King
  • *****
    • Posts: 16152
Add this
Code: [Select]
catch (Exception e)
{
e.printStackTrace();
LOGGER.warning("TradeController: Could not update Timer save in Buylist");
}


Offline spawnz

  • Vassal
  • *
    • Posts: 4
Today the gameserver gave me this error.


Code: [Select]
   [27/09 12:47:12] TradeController: Could not update Timer save in Buylist
   [27/09 12:47:13] TradeController: Could not update Timer save in Buylist


Online Mobius

  • Distinguished King
  • *****
    • Posts: 16152

Offline spawnz

  • Vassal
  • *
    • Posts: 4
When starting the server this happens!

https://imgur.com/imYvWil


Code: [Select]
protected void dataTimerSave(int time)
{
final long timerSave = System.currentTimeMillis() + (time * 60 * 60 * 1000);
try (Connection con = DatabaseFactory.getConnection())
{
final PreparedStatement statement = con.prepareStatement("UPDATE merchant_buylists SET savetimer =? WHERE time =?");
statement.setLong(1, timerSave);
statement.setInt(2, time);
statement.executeUpdate();
statement.close();
}
catch (Exception e)
{
LOGGER.warning("TradeController: Could not update Timer save in Buylist");
}
}

Yes The Same , Happens


Online Mobius

  • Distinguished King
  • *****
    • Posts: 16152
Add this
Code: [Select]
catch (Exception e)
{
e.printStackTrace();
LOGGER.warning("TradeController: Could not update Timer save in Buylist");
}


Offline warjoker

  • Heir
  • **
    • Posts: 11
Criticizes an error in the initial village! When you buy warrior armor! Similar problem with byulist. But it doesn't write the error in the logs.


Online Mobius

  • Distinguished King
  • *****
    • Posts: 16152
Code: [Select]
Index: java/org/l2jmobius/gameserver/TradeController.java
===================================================================
--- java/org/l2jmobius/gameserver/TradeController.java (revision 7672)
+++ java/org/l2jmobius/gameserver/TradeController.java (working copy)
@@ -462,7 +462,7 @@
  }
  catch (Exception e)
  {
- LOGGER.warning("TradeController: Could not update Timer save in Buylist");
+ LOGGER.warning("TradeController: Could not update Timer save in Buylist." + e);
  }
  }