Void ? HELP!

Discussion in 'Plugin Development' started by Weszzz, Sep 16, 2013.

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

    Weszzz

    SOLVED
     
  2. Offline

    EdenCampo

    Weszzz

    Make it like this:
    Code:java
    1. private void boom(Block b)
    2. {
    3. b.getWorld().createExplosion(b.getX(), b.getY(), b.getZ(), 5.0F, true, true);
    4. }
     
  3. Offline

    Weszzz

    Not working if i do that i get this:
    Multiple markers at this line
    - void is an invalid type for the
    variable boom
    - Syntax error on token "(", ; expected
    - Syntax error on token ")", ; expected
     
  4. Offline

    Chinwe

    Weszzz
    READ the marker - ; expected. Hence, you are missing semicolons.
    And are you trying to create this method inside of another method?
     
  5. Offline

    Weszzz

    If i replace the ( with a semicolon. It says theres another ( but theres not, and i just get void is an invalid type for the
    variable boom.

    Anybody ?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 4, 2016
  6. Offline

    metalhedd

    Weszzz don't bump a post until 24 hours have passed. You're not going to get much help with your problem here because it's not related in any way to bukkit. You'd be much better off learning java before attempting to work with the bukkit api and asking for help here.

    With all due respect, you don't. I don't claim to know how to play guitar just because I plucked a string once. You're lacking even the most fundamental understanding of how a programming language works, You're asking for help with the basic syntax of the language, and struggling with it, so at best you're trying to learn java, you don't know it.

    I'm not saying this to be rude, I'm saying it because this is definitely not the place for questions like this. it's a forum for support with the bukkit api, not eclipse support or a java beginners forum.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 4, 2016
  7. Offline

    Chinwe

    Weszzz
    The method createExplosion() is, yes, but the questions you're asking about Eclipse marker errors and Java syntax isn't :oops:
     
  8. Offline

    metalhedd


    You're using the bukkit api, but your problem isn't related to it in any way. a syntax error is not a fault of the api, it's essentially a typo that you've made (due to a lack of understanding basic java syntax)
     
Thread Status:
Not open for further replies.

Share This Page