Page 1 of 1

[FIXED]Daily World Chat Point

Posted: Sat Jan 31, 2015 2:47 pm
by Yunaleska
Hello, one little problem on TaskDailyWorldChatPointReset.java

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();
		}

Re: Daily World Chat Point

Posted: Sat Jan 31, 2015 3:54 pm
by St3eT
Look's correct, make Pull Request.

Re: Daily World Chat Point

Posted: Sat Jan 31, 2015 3:59 pm
by Yunaleska
Ok

it will be done tomorrow (AFK today :lol: )

Re: Daily World Chat Point

Posted: Tue Feb 03, 2015 11:50 am
by Sdw
Sorry that one was pissing me off, couldn't wait :D

Fixed in [commit]6b1466d29f608a4e58259b76f713422fb04d8bad[/commit] thanks !