Get Prefix Error #11


  • New
  • Defect
Open
Assigned to _ForgeUser10172331
  • _ForgeUser7599821 created this issue Dec 7, 2013

    What steps will reproduce the problem?
    1. Turn the server on.
    2. Let the broadcasts run.
    3.

    What is the expected output? What do you see instead?
    Output is usual but errors spam console.

    What version of the product are you using?
    v1.3.5

    Do you have an error log of what happened?
    [08:33:55 WARN]: Exception in thread "pool-3-thread-159"
    [08:33:55 WARN]: org.apache.commons.lang.UnhandledException: Plugin broad-cast v
    1.3.5 generated an exception while executing task 29
            at org.bukkit.craftbukkit.v1_7_R1.scheduler.CraftAsyncTask.run(CraftAsyn
    cTask.java:56)
            at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
            at java.lang.Thread.run(Unknown Source)
    Caused by: java.lang.ArithmeticException: / by zero
            at me.stephanvl.Broadcast.BcMetrics.getUsedPrefix(BcMetrics.java:41)
            at me.stephanvl.Broadcast.BcMetrics$1.getValue(BcMetrics.java:352)
            at me.stephanvl.Broadcast.Metrics.postPlugin(Metrics.java:439)
            at me.stephanvl.Broadcast.Metrics.access$4(Metrics.java:367)
            at me.stephanvl.Broadcast.Metrics$1.run(Metrics.java:241)
            at org.bukkit.craftbukkit.v1_7_R1.scheduler.CraftTask.run(CraftTask.java
    :53)
            at org.bukkit.craftbukkit.v1_7_R1.scheduler.CraftAsyncTask.run(CraftAsyn
    cTask.java:53)
            ... 3 more

    Please provide any additional information below.
    I looked at your code and it is because you need to update the totalMessages to something other than 0 before dividing the returns.

  • _ForgeUser7599821 added the tags New Defect Dec 7, 2013
  • _ForgeUser7599821 posted a comment Dec 7, 2013

    It could also probably work if you just got rid of the totalMessages or just set it to 1.


To post a comment, please login or register a new account.