[Bug /setctag]

Discussion in 'Help & Support / Errors & Bugs' started by BackToThePast, Jun 6, 2016.

  1. BackToThePast

    BackToThePast Builder
    Builder ⛰️ Ex-EcoLegend ⚜️⚜️⚜️⚜️ Prestige ⭐ II ⭐ Premium Upgrade

    Joined:
    Jan 14, 2013
    Messages:
    1,750
    Trophy Points:
    58,410
    Gender:
    Male
    Ratings:
    +2,134
    Minecraft Username:
    BackToThePast
    Brief Description:
    After recent update, I did "/setctag TeamRheas" and it did not let me change it. Later, I did "/setctag 1" and it worked.
    Instructions:
    1. /setctag <letters>
    How many times did you recreate this bug?:
    5~
    Result:
    "Your Custom Tag can only be alphanumeric"
    Expected Result:
    It should change.
    Evidence:
    I cannot post any because I tested mine with numbers and it changed.
     
  2. andrewkm

    Founder Premium Upgrade

    Joined:
    Apr 5, 2011
    Messages:
    20,683
    Trophy Points:
    102,160
    Ratings:
    +15,143
    @JamieSinn I loaded this:
    - if (ctag.matches("[^a-zA-Z\\d]") || ctag.contains(" ") || ctag.contains("&"))
    + if (!ctag.matches("[a-zA-Z0-9]"))

    Broken.
     
  3. JamieSinn

    JamieSinn Retired Lead Administrator/Developer
    Builder ⛰️ Ex-Tycoon ⚜️⚜️⚜️ Premium Upgrade

    Joined:
    Jun 4, 2011
    Messages:
    5,517
    Trophy Points:
    78,090
    Gender:
    Male
    Ratings:
    +4,588
    Okay java, you are seriously annoying me.
     
    • Winner Winner x 2
    • Like Like x 1
    • List
  4. 314

    314 Irrational SuperMod, former ServerAdmin
    SuperMod EcoLegend ⛰️⛰️⛰️⛰️ Ex-President ⚒️⚒️ Prestige ⭐ VI ⭐ Premium Upgrade

    Joined:
    Apr 1, 2014
    Messages:
    7,055
    Trophy Points:
    97,160
    EcoDollars:
    $2,400,000
    Ratings:
    +4,921
    Shouldn't this regex match any letter or digit, but only exactly one?

    Please ignore this if:
    a. I am still too tired to understand your intentions.
    b. I lack context to understand your intentions.
    :p
     
  5. kukelekuuk

    kukelekuuk C͕̹̲̽ͪ͐ͩ̔L̜̦̝͈ͦ̿̾̿ḘA̻̗̤̳̐ͭ̆̿̃̑ͭN̊̓͑̇ͯ
    Builder ⛰️ Ex-EcoLeader ⚜️⚜️⚜️ Premium Upgrade

    Joined:
    May 25, 2011
    Messages:
    10,061
    Trophy Points:
    80,160
    Ratings:
    +6,925
    While not completely correct, you're on the right track. Matches checks if the regex matches any part of the string. Right now it checks if the regex doesn't match any alphanumeric characters instead of checking if it contains anything but alphanumeric. Basically it should be [^a-zA-Z0-9] or something. II can't double check, since I'm on my phone