Thread: Emulous countPlayers

Results 1 to 4 of 4
  1. #1 Emulous countPlayers 
    m2ti
    Guest
    Somehow Emulous player counter counts all connects. So if there are made 300 connections it will show playercount 300, altough there maybe online only like 3-4 players.
    Reply With Quote  
     

  2. #2  
    Registered Member
    Chachi's Avatar
    Join Date
    Sep 2008
    Posts
    1,536
    Thanks given
    49
    Thanks received
    103
    Rep Power
    602
    Use

    Code:
    Thread.activeCount()
    NOT
    Code:
    PlayerHandler.getPlayerCount()
    for a quick fix for it.
    [/CENTER]
    Reply With Quote  
     

  3. #3  
    m2ti
    Guest
    Quote Originally Posted by Chachi View Post
    Use

    Code:
    Thread.activeCount()
    NOT
    Code:
    PlayerHandler.getPlayerCount()
    for a quick fix for it.
    Thanks this helps.

    But when i am testing server with allgofree bot then i get. Even if i have like 400 mb free memory to use. Is there limit how much memory java may use or smth?

    Reply With Quote  
     

  4. #4  
    Registered Member
    Chachi's Avatar
    Join Date
    Sep 2008
    Posts
    1,536
    Thanks given
    49
    Thanks received
    103
    Rep Power
    602
    If Java runs out of memory, the following error occurs:

    Exception in thread "main" java.lang.OutOfMemoryError: Java heap space

    This can have two reasons:

    * Your Java application has a memory leak. There are tools like YourKit Java Profiler that help you to identify such leaks.
    * Your Java application really needs a lot of memory (more than 128 MB by default!). In this case the Java heap size can be increased using the following runtime parameters:

    java -Xms<initial heap size> -Xmx<maximum heap size>

    Defaults are:

    java -Xms32m -Xmx128m

    You can set this either in the Java Control Panel or on the command line, depending on the environment you run your application.


    I didn't write that, but that will help you
    [/CENTER]
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •