Server logs:
[31/01 06:30:00] Daily skill reuse cleaned.
[31/01 06:30:00] TaskDailyWorldChatPointReset: Could not reset daily world chat points: java.sql.SQLException: No value specified for parameter 2
[31/01 06:30:00] Daily world chat points has been resetted.
[31/01 06:30:00] Recommendations System reseted
Code: Select all
@Override
public void onTimeElapsed(ExecutedTask task)
{
// Update data for offline players.
try (Connection con = L2DatabaseFactory.getInstance().getConnection();
PreparedStatement ps = con.prepareStatement("UPDATE character_variables SET val = ? WHERE var = ?"))
{
ps.setInt(1, Config.WORLD_CHAT_POINTS_PER_DAY);
ps.setString(1, L2PcInstance.WORLD_CHAT_VARIABLE_NAME); // THAT 1 must be 2
ps.executeUpdate();
}
Code: Select all
@Override
public void onTimeElapsed(ExecutedTask task)
{
// Update data for offline players.
try (Connection con = L2DatabaseFactory.getInstance().getConnection();
PreparedStatement ps = con.prepareStatement("UPDATE character_variables SET val = ? WHERE var = ?"))
{
ps.setInt(1, Config.WORLD_CHAT_POINTS_PER_DAY);
ps.setString(2, L2PcInstance.WORLD_CHAT_VARIABLE_NAME);
ps.executeUpdate();
}