[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,749
    Trophy Points:
    62,410
    Gender:
    Male
    Ratings:
    +2,128
    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,834
    Trophy Points:
    121,160
    Ratings:
    +15,219
    @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,509
    Trophy Points:
    97,090
    Gender:
    Male
    Ratings:
    +4,567
    Okay java, you are seriously annoying me.
     
    • Winner Winner x 2
    • Like Like x 1
    • List
  4. 314

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

    Joined:
    Apr 1, 2014
    Messages:
    7,219
    Trophy Points:
    101,160
    EcoDollars:
    $0
    Ratings:
    +4,919
    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,051
    Trophy Points:
    99,160
    Ratings:
    +6,910
    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