Officially Annoyed

Discussion in 'Plugin Development' started by Stuperfied, Oct 18, 2014.

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

    Stuperfied

    Code:java
    1. keys = Matcher.quoteReplacement("++");
    2. values = Matcher.quoteReplacement("+");
    3. Bukkit.getServer().broadcastMessage("Fix 1 again");
    4. argument.replaceAll(keys, values);


    Ok, so why wont this work???
    Note: keys is just a name, im not trying to imply anything to do with lists
     
  2. Offline

    tcvs

    Stuperfied What are you trying to do? There is not enough information given to understand what you are doing...
     
  3. Offline

    RawCode

    provide valid method, it's input and desired output.

    this is not "make for me" section.
     
    _Filip likes this.
  4. Offline

    FerusGrim

    Right. Don't worry, we'll try to not make it for you. However, you haven't told us what you're trying to do nor what the code above is supposed to do nor what that code above is actually doing that is wrong.
     
  5. Offline

    Stuperfied

    Thanks for offering your help FerusGrim but I solved it now. Its good to know there is a place like this I can come to for help.

    RawCode:
    No, its a help section and I obviously needed help as I spent 3 hrs looking for the answer. What I didn't realize is that the docs don't tell you strings are never altered, instead a new string is created. Also, I didn't see anything in them to tell me that the replaceAll is very strict and I should have been using replace instead.

    Im not a noob to programing, just to java and if you noticed, im only asking about simple things like java's syntax and required formats for types. I don't need you to write the program for me, just give me a hand converting the C++, PHP, JavaScript, Perl, Python and other languages I have in my head into Java format.

    Ok, im done ranting now.
     
  6. Offline

    _Filip

    RawCode and Nateb1121 like this.
Thread Status:
Not open for further replies.

Share This Page