• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

String case error

Status
Not open for further replies.
Level 12
Joined
Dec 2, 2016
Messages
733
JASS:
  local string currPlayer
  loop
    exitwhen i > 11
    set players[i] = PlayerStruct.create(i)
   set currPlayer = GetPlayerName(Player(i))
   StringCase(currPlayer, true)
    if (ClanTag.checkMember(i, COLOR_ACCESS_1) and not ClanTag.checkMember(i, COLOR_ACCESS_NO_TAG)) then
      set players[i].name = "[VFG]"+GetPlayerName(Player(i))
    elseif currPlayer == "RUGARUSVF" or currPlayer == "DOMINGOS" or currPlayer == "FINEX" or currPlayer == "MADERYAR" or currPlayer == "SINDRICUS" or currPlayer == "THEHUMANHUNTER" or currPlayer == "MRGAJ" then
   set players[i].name = "[RG]"+GetPlayerName(Player(i))
   else
      set players[i].name = GetPlayerName(Player(i))
    endif

    set i = i + 1
  endloop


So the idea of this script is to convert each player's names to all caps and the if statement adds a clan tag onto their name if the name matches. But I get this error: Screenshot - 6ec2e5b4b8ed1dd1c3f0e4b1e2d04e94 - Gyazo

I assume I went about doing this wrong?

I'm trying to convert the string 'currPlayer' to all uppercase.
 
Status
Not open for further replies.
Top