Scoreboard Errors

Discussion in 'Plugin Development' started by Virgoth098, May 25, 2013.

Thread Status:
Not open for further replies.
  1. Offline

    Virgoth098

    So basically I am trying to display a scoreboard to a player that displays their own EP, which is basically a variable that is stored in the plugin.
    Code:
    ScoreboardManager manager = Bukkit.getScoreboardManager();
        Scoreboard board = manager.getNewScoreboard();
        Objective objective = board.registerNewObjective("showEP", "ep");
        objective.setDisplaySlot(DisplaySlot.SIDEBAR);
        Score score = objective.getScore(player);
        score.setScore(42); //Integer only!;
    I don't know how to see who the player is, and how to properly display their respective EP. The copde also gives me an error on setDisplaySlot, saying "Syntax error on token "setDisplaySlot", Identifier expected after this token" as well as these errors on the "42" [​IMG]
    It says that 42 shouldn't be there, but I'm pretty sure it should...

    Any help?
     
  2. Offline

    caseif

    This is usually caused by not containing the code in a method. While I can't see whether or not this is true, I'm willing to bet it's your issue.
     
Thread Status:
Not open for further replies.

Share This Page