• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Adding colours to variables

Status
Not open for further replies.
Level 2
Joined
Jun 8, 2014
Messages
15
Hi! I would like to know how to I go about adding colours to the string. In custom script, I get this error "Expected expression".

My custom script code is:
  • Custom script: set udg_STRING[3] = udg_STRING[2] + " " + |cffff0000udg_STRING[4]|r + " " + udg_STRING[1]
I was wondering if this method of adding colours work. If not, any suggestions?

Thank you!
 
Level 23
Joined
Apr 16, 2012
Messages
4,041
set udg_String[3] = udg_STRING[2] + " |cffff0000" + udg_STRING[4] + "|r " + udg_STRING[1]

please note that you have 5 bytes in your color code, so the last 2 0s wil be also colored(color consists of 4 bytes which is 8 hexadecimal letters 0-f)

you can achieve this by using String Concentration or w/e its called in GUI
 
Status
Not open for further replies.
Top