- 0
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..
Question
wibox
code:
public int getLastGotKill() { Connection con = null; int last_pvp_time = 0; try { con = L2DatabaseFactory.getInstance().getConnection(false); PreparedStatement statement; statement = con.prepareStatement("select last_got_kill from characters where obj_Id=?"); statement.setInt(1, getObjectId()); ResultSet rset = statement.executeQuery(); while(rset.next()) { last_pvp_time = rset.getInt("last_got_kill"); _log.info("last pvp time is : " + last_pvp_time); } rset.close(); rset = null; statement.close(); statement = null; } catch(Exception e) { if(Config.ENABLE_ALL_EXCEPTIONS) e.printStackTrace(); } finally { CloseUtil.close(con); con = null; } return last_pvp_time; }why does this return always 0 ? i am sure that the column last_got_kill is not zero for the selected player
2 answers to this question
Recommended Posts