f0zi Posted March 24, 2013 Posted March 24, 2013 It is good! But I have a question that made me freaking out with sql query... PreparedStatement statement = con.prepareStatement("SELECT SUM(chr.points), SUM(it.count), ch.char_name, ch.pkkills, ch.pvpkills, ch.onlinetime, ch.base_class, ch.online FROM characters ch LEFT JOIN character_raid_points chr ON ch.charId=chr.charId LEFT OUTER JOIN items it ON ch.charId=it.owner_id WHERE item_id=57 GROUP BY ch.charId ORDER BY " + sort + " DESC LIMIT " + Config.TOP_PLAYER_RESULTS); Here what I supposed to do... I was thinking show only normal players with accesslevel 0 so, I decide to add that query: PreparedStatement statement = con.prepareStatement("SELECT SUM(chr.points), SUM(it.count), ch.char_name, ch.pkkills, ch.pvpkills, ch.onlinetime, ch.base_class, ch.online FROM characters ch LEFT JOIN character_raid_points chr ON ch.charId=chr.charId LEFT OUTER JOIN items it ON ch.charId=it.owner_id WHERE item_id=57 and ch.accesslevel=0 GROUP BY ch.charId ORDER BY " + sort + " DESC LIMIT " + Config.TOP_PLAYER_RESULTS); I do only put it and ch.accesslevel=0, but it doesn't make anything =(
Darule Posted March 24, 2013 Author Posted March 24, 2013 @f0zi Try this one PreparedStatement statement = con.prepareStatement("SELECT SUM(chr.points), SUM(it.count), ch.char_name, ch.pkkills, ch.pvpkills, ch.onlinetime, ch.base_class, ch.online, ch.accesslevel FROM characters ch LEFT JOIN character_raid_points chr ON ch.charId=chr.charId LEFT OUTER JOIN items it ON ch.charId=it.owner_id WHERE item_id=57 and ch.accesslevel=0 GROUP BY ch.charId ORDER BY " + sort + " DESC LIMIT " + Config.TOP_PLAYER_RESULTS); You fortgot to select the ch.accesslevel column.
Darule Posted April 5, 2013 Author Posted April 5, 2013 i get this error in eclipse : [javac] Note: Some input files use or override a deprecated API. [javac] Note: Recompile with -Xlint:deprecation for details. and in game i get first page html but when i click any thing it says Comunity Board: unknown Board: _bbstop any help is rly appreciated thnx What pack do you use? Maybe you didnt imported correct, try again and check for errors b4 compiling they show up in eclipse.
RefuelGozos Posted June 8, 2013 Posted June 8, 2013 hello i have 2 error any help me TopBBSManager.java public String getRealOnline() { int counter = 0; for (L2PcInstance onlinePlayer : L2World.getInstance().getAllPlayersArray()) { if (onlinePlayer.isOnline() && (onlinePlayer.getClient() != null && !onlinePlayer.getClient().isDetached())) { counter++; } } Gracia Epilogue thanks
Darule Posted June 8, 2013 Author Posted June 8, 2013 @RefuelGozos: You propably use another pack that doesnt have these methods. Which pack do you use? Try to find similar methods of them, or you can alternate the code to your pack.
Erlandys Posted June 8, 2013 Posted June 8, 2013 @RefuelGozos: sorry for interrupting, but try this: instead of this: for (L2PcInstance onlinePlayer : L2World.getInstance().getAllPlayersArray()) try to use this: for (L2PcInstance onlinePlayer : L2World.getInstance().getAllPlayers().values()) and if you use L2jServer epilogue I think this should be done: if (onlinePlayer.isOnline() && (onlinePlayer.getClient() != null && !onlinePlayer.getClient().isDetached())) to: if (onlinePlayer.isOnline() == 1 && (onlinePlayer.getClient() != null && !onlinePlayer.getClient().isDetached()))
RefuelGozos Posted June 8, 2013 Posted June 8, 2013 @RefuelGozos: sorry for interrupting, but try this: instead of this: for (L2PcInstance onlinePlayer : L2World.getInstance().getAllPlayersArray()) try to use this: for (L2PcInstance onlinePlayer : L2World.getInstance().getAllPlayers().values()) and if you use L2jServer epilogue I think this should be done: if (onlinePlayer.isOnline() && (onlinePlayer.getClient() != null && !onlinePlayer.getClient().isDetached())) to: if (onlinePlayer.isOnline() == 1 && (onlinePlayer.getClient() != null && !onlinePlayer.getClient().isDetached())) fixed ty.
remy80 Posted June 8, 2013 Posted June 8, 2013 Hello here I have a small error (Version H5 p5) error: non-static method getGameTicks() cannot be referenced from a static context int timeSeconds = (GameTimeController.getGameTicks() - 36000) / 10;
Erlandys Posted June 9, 2013 Posted June 9, 2013 @remy80 change this: int timeSeconds = (GameTimeController.getGameTicks() - 36000) / 10; to this: int timeSeconds = (GameTimeController.getInstance().getGameTicks() - 36000) / 10;
remy80 Posted June 9, 2013 Posted June 9, 2013 thx for Code me need new help [09 juin 18:17:00] GameServer connected! [09 juin 18:18:59] Connection lost! java.io.IOException: TCP Read: Failed reading. at org.netcon.NetConnection.read(NetConnection.java:109) at com.l2jserver.communityserver.network.GameServerThread.run(GameServer Thread.java:85)
Zaranox Posted August 1, 2013 Posted August 1, 2013 i only want to have the boss raid info (boss.htm) at the favorite tab. what do i have to change? :poker face: _bbsgetfav unknown board. i use latest l2j h5 :good sir: i tried for several hours ._. :o
Recommended Posts