[Solved] Code keeps getting messed up on commands

Discussion in 'Plugin Development' started by FTWin01Gurl, Jun 23, 2012.

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


    This issue has stumped me for hours now and I haven't found a solution.

    2. } else if(args.length == 3) {
    3. else if(args[0].equalsIgnoreCase("set")) {
    4. //Do stuff
    5. }
    6. } else if(args.length == 4) {

    This code returns an error (which is the first stating curly bracket starting a new statement) which means it requires a closing bracket. However, I've tried to correct my code and it messes up the command. How would I go fixing this dilemma?

    EDIT: I have the code, only censored. http://pastebin.com/kPG0w1Kh
  2. Offline


    The problem is most likely that you have an else if inside the curly brackets, but no if preceding that else if(if that makes any sense).

     else if(args.length == 3) {
    ***THIS ONE RIGHT HERE***else if(args[0].equalsIgnoreCase("set")) {
    //Do stuff
    } else if(args.length == 4) {
  3. Offline


    You need a closing bracket after the last return false

    That too :p

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


Thread Status:
Not open for further replies.

Share This Page