[FIXED]Daily World Chat Point

Move here solved/invalid bug reports.
Please add manual tag [INVALID] to invalid reports, until we add new tag system, thanks.
Post Reply
Yunaleska
Posts: 17
Joined: Fri Jul 22, 2011 4:00 pm

[FIXED]Daily World Chat Point

Post 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();
		}
User avatar
St3eT
Posts: 961
Joined: Sun Mar 07, 2010 6:50 pm

Re: Daily World Chat Point

Post by St3eT »

Look's correct, make Pull Request.
If i should be black sheep for sure no as punishment
Image
Yunaleska
Posts: 17
Joined: Fri Jul 22, 2011 4:00 pm

Re: Daily World Chat Point

Post by Yunaleska »

Ok

it will be done tomorrow (AFK today :lol: )
Sdw
L2j Veteran
L2j Veteran
Posts: 855
Joined: Mon May 03, 2010 8:38 am
Location: France

Re: Daily World Chat Point

Post by Sdw »

Sorry that one was pissing me off, couldn't wait :D

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