Jump to content

Recommended Posts

Posted

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 =(

 

Posted

@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.

  • 2 weeks later...
Posted

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.

  • 2 months later...
Posted

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

Posted

@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.

Posted

@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()))

Posted

@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.

 

 

 

Posted

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;

Posted

@remy80

change this:

    int timeSeconds = (GameTimeController.getGameTicks() - 36000) / 10;

to this:

    int timeSeconds = (GameTimeController.getInstance().getGameTicks() - 36000) / 10;

Posted

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)

  • 1 month later...
Posted

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

Guest
This topic is now closed to further replies.



×
×
  • Create New...