Thread: Shard Revolutions Object Error

Results 1 to 10 of 10
  1. #1 Shard Revolutions Object Error 
    Zederation
    Guest
    Hello, recently i was adding objects to the Shard Revolutions Standard Edition when i came across a huge bug. So i opened spawns.cfg and added:

    // ID X Y Height Face Type Description
    object = 3465 3222 3215 0 FACE_NORTH 10 Portal


    I then saved the file and logged in.

    My chatbox constantly repeated "Welcome to Shard Revolutions." and would not stop.

    My console constantly repeated:

    [00:00:57]: at com.rs.worldserver.world.ObjectManager.update(Obje ctManager.j
    ava:166)
    [00:00:57]: at com.rs.worldserver.model.player.Client.doZoning(Cl ient.java:4
    11)
    [00:00:57]: at com.rs.worldserver.model.player.Client.update(Clie nt.java:402
    )
    [00:00:57]: at com.rs.worldserver.model.player.Client.initialize( Client.java
    :337)
    [00:00:57]: at com.rs.worldserver.world.PlayerManager.process(Pla yerManager.
    java:250)
    [00:00:57]: at com.rs.worldserver.Server$1.execute(Server.java:15 8)
    [00:00:57]: at com.rs.worldserver.events.EventContainer.execute(E ventContain
    er.java:116)
    [00:00:57]: at com.rs.worldserver.events.EventManager.run(EventMa nager.java:
    136)
    [00:00:57]: at java.lang.Thread.run(Unknown Source)
    [00:00:58]: java.lang.NullPointerException


    So i tried to spawn a different object, and i found that some objects spawn and some don't (The ones that don't spawn cause this error)

    The majority of objects cause this huge error.

    Here is line 165 of ObjectManager.java:
    p.getActionAssistant().sendReplaceObject(g.getAbsX (),

    Here is the code around it:


    /**
    * Updates a client's objects.
    *
    * @param client
    */
    public void update(Client p) {
    for (GameObject g : objects) {
    if (g.getHeightLevel() != p.getHeightLevel())
    continue;
    int tmpX = g.getAbsX() - p.getAbsX();
    int tmpY = g.getAbsY() - p.getAbsY();
    if (tmpX >= -96 && tmpX <= 96 && tmpY >= -96 && tmpY <= 96) {
    p.getActionAssistant().sendReplaceObject(g.getAbsX (),
    g.getAbsY(), g.getDefinition().getType(),
    g.getFaceID(), g.getType());
    }
    }
    }




    I really want to start adding some portals and stuff in the server, but until this is fixed i will have to wait. So any sensible suggestions would be appreciated a lot. Thanks
     

  2. #2  
    Registered Member

    Join Date
    Sep 2007
    Age
    32
    Posts
    2,396
    Thanks given
    5
    Thanks received
    436
    Rep Power
    902
    ill look into it later when i get a chance i never got this bug then then again i never add objects try checking this part

    [00:00:57]: at com.rs.worldserver.model.player.Client.doZoning(Cl ient.java:4
    11)
    ill check when im actally back home
    Hyperion V2 Martin's Updates.

    Scar says:
    i hate it when it hits your face
     

  3. #3  
    Zederation
    Guest
    Thanks mad turnip, really appreciate it.

    Has anyone else got any suggestions?

    Line 411 of Client.java:

    Server.getObjectManager().update(this);


    The code around it:

    public void doZoning() {
    Server.getItemManager().update(this);
    Server.getObjectManager().update(this);
    }

    Any ideas anyone? I will appreciate it A LOT.
    Last edited by Zederation; 01-22-2009 at 06:56 PM. Reason: Double posting is not allowed!
     

  4. #4  
    ( ͡° ͜ʖ ͡°)
    Edgeville's Avatar
    Join Date
    Nov 2007
    Posts
    2,453
    Thanks given
    80
    Thanks received
    428
    Rep Power
    2589
    Use CODE][/CODE] around your code snippets to make it easier to read

    Attached image
     

  5. #5  
    Ben
    Guest
    Are you tabbing instead of spacing? Java does not like spaces very much.
     

  6. #6  
    Zederation
    Guest
    This still has not been answered. Anyone out there know? Possibly some people from the Shard Revolutions development team?
     

  7. #7  
    Programmer, Contributor, RM and Veteran




    Join Date
    Mar 2007
    Posts
    5,147
    Thanks given
    2,656
    Thanks received
    3,731
    Rep Power
    5000
    Quote Originally Posted by Songoty View Post
    Are you tabbing instead of spacing? Java does not like spaces very much.
    Java mainly doesn't care about whitespace. Some people may prefer tabs, some may prefer 4 spaces, some 2, some 6, etc, etc.
    .
     

  8. #8  
    Banned

    Join Date
    Jul 2008
    Age
    28
    Posts
    5,827
    Thanks given
    1,301
    Thanks received
    197
    Rep Power
    0
    does it make ANY difference? I thought the compiler removed the spaces/tabs..
     

  9. #9  
    Zederation
    Guest
    Don't worry guys i have found a fix.
     

  10. #10  
    Programmer, Contributor, RM and Veteran




    Join Date
    Mar 2007
    Posts
    5,147
    Thanks given
    2,656
    Thanks received
    3,731
    Rep Power
    5000
    Out of interest how did you fix it? So other people will know.
    .
     


Thread Information
Users Browsing this Thread

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


User Tag List

Tags for this Thread

View Tag Cloud

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