Thread: Entering/leaving instance crashes the client

Results 1 to 4 of 4
  1. #1 Entering/leaving instance crashes the client 
    Registered Member
    Join Date
    Dec 2015
    Posts
    42
    Thanks given
    1
    Thanks received
    1
    Rep Power
    11
    So im using anguish source and i tried to add a boss that spawns in a instance. At first it worked fine when i used vorkath area as place holder but when i changed the location it starter crash the client 1 second after i click on the door that should start the instance. (The instance/boss code is basicly just the vorkaths code that i changed names drops and coords.)
    Spoiler for Error:

    Exception in thread "Thread-5" java.lang.ArithmeticException: / by zero
    at com.client.Client.method98(Client.java:10522) entity.x = (k * (i - j) + i1 * j) / i;
    at com.client.Client.method96(Client.java:10489) method98(entity);
    at com.client.Client.method114(Client.java:12604) method96(player);
    at com.client.Client.mainGameProcessor(Client.java:41 76) method114();
    at com.client.Client.processGameLoop(Client.java:3341 ) mainGameProcessor();
    at com.client.RSApplet.run(RSApplet.java:275) processGameLoop();
    at com.client.Client.run(Client.java:6285) super.run();
    at java.lang.Thread.run(Unknown Source)
    Reply With Quote  
     

  2. #2  
    Community Veteran


    arch337's Avatar
    Join Date
    Sep 2008
    Posts
    2,833
    Thanks given
    187
    Thanks received
    306
    Discord
    View profile
    Rep Power
    770
    You are trying to divide something with zero and you can't do that aka your value "i" equals 0.


    "A fail act is something you do regular, but a dumb act is something you can learn from"
    Spoiler for Problem?:
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Dec 2015
    Posts
    42
    Thanks given
    1
    Thanks received
    1
    Rep Power
    11
    Quote Originally Posted by arch337 View Post
    You are trying to divide something with zero and you can't do that aka your value "i" equals 0.
    Spoiler for Code:
    public void method98(Entity entity) {
    if (entity.anInt1548 == loopCycle || entity.anim == -1 || entity.anInt1529 != 0
    || entity.anInt1528 + 1 > AnimationDefinition.anims[entity.anim].method258(entity.anInt1527)) {
    int i = entity.anInt1548 - entity.anInt1547;
    int j = loopCycle - entity.anInt1547;
    int k = entity.anInt1543 * 128 + entity.anInt1540 * 64;
    int l = entity.anInt1545 * 128 + entity.anInt1540 * 64;
    int i1 = entity.anInt1544 * 128 + entity.anInt1540 * 64;
    int j1 = entity.anInt1546 * 128 + entity.anInt1540 * 64;
    entity.x = (k * (i - j) + i1 * j) / i;
    entity.y = (l * (i - j) + j1 * j) / i;
    }
    entity.anInt1503 = 0;
    if (entity.anInt1549 == 0)
    entity.turnDirection = 1024;
    if (entity.anInt1549 == 1)
    entity.turnDirection = 1536;
    if (entity.anInt1549 == 2)
    entity.turnDirection = 0;
    if (entity.anInt1549 == 3)
    entity.turnDirection = 512;
    entity.anInt1552 = entity.turnDirection;
    }

    Thats the full method but why would it start crashing client when i moved where the boss will spawn etc? I changed nothing on the client when adding the boss in.
    Reply With Quote  
     

  4. #4  
    Contributor

    clem585's Avatar
    Join Date
    Sep 2013
    Posts
    3,556
    Thanks given
    652
    Thanks received
    640
    Rep Power
    358
    Quote Originally Posted by takanas View Post
    Spoiler for Code:
    public void method98(Entity entity) {
    if (entity.anInt1548 == loopCycle || entity.anim == -1 || entity.anInt1529 != 0
    || entity.anInt1528 + 1 > AnimationDefinition.anims[entity.anim].method258(entity.anInt1527)) {
    int i = entity.anInt1548 - entity.anInt1547;
    int j = loopCycle - entity.anInt1547;
    int k = entity.anInt1543 * 128 + entity.anInt1540 * 64;
    int l = entity.anInt1545 * 128 + entity.anInt1540 * 64;
    int i1 = entity.anInt1544 * 128 + entity.anInt1540 * 64;
    int j1 = entity.anInt1546 * 128 + entity.anInt1540 * 64;
    entity.x = (k * (i - j) + i1 * j) / i;
    entity.y = (l * (i - j) + j1 * j) / i;
    }
    entity.anInt1503 = 0;
    if (entity.anInt1549 == 0)
    entity.turnDirection = 1024;
    if (entity.anInt1549 == 1)
    entity.turnDirection = 1536;
    if (entity.anInt1549 == 2)
    entity.turnDirection = 0;
    if (entity.anInt1549 == 3)
    entity.turnDirection = 512;
    entity.anInt1552 = entity.turnDirection;
    }

    Thats the full method but why would it start crashing client when i moved where the boss will spawn etc? I changed nothing on the client when adding the boss in.
    Your entity index might be 0?
    Project thread
    [Only registered and activated users can see links. ]
    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

Similar Threads

  1. Replies: 7
    Last Post: 10-07-2015, 02:36 AM
  2. Replies: 6
    Last Post: 02-10-2013, 11:27 PM
  3. Replies: 2
    Last Post: 11-11-2012, 01:39 AM
  4. Noted items causes the client to crash
    By Tringan in forum Help
    Replies: 14
    Last Post: 02-01-2012, 07:44 PM
  5. range crashes the server and the client
    By xSelseor in forum Help
    Replies: 9
    Last Post: 07-11-2009, 05:59 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •