Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: Alessaint on July 15, 2012, 01:09:31 PM

Title: Problem with string format
Post by: Alessaint on July 15, 2012, 01:09:31 PM
Hi,

I have problem with displaying this

[00FF00][IAN][-] (which should display [IAN] in green)

Every other name works fine, however this doesn't show anything. It looks like the "N" character is to blame - if I change it to any else, it works.

Any ideas why is this happening?

Thanks

A.

Title: Re: Problem with string format
Post by: ArenMook on July 15, 2012, 01:33:04 PM
It's not IAN, its the number of characters. "[IAN][-]" gets treated as one cohesive block as you have 6 characters wrapped in square brackets. This value gets interpreted as a color. Check NGUITools.ParseSymbol. Easiest way to fix it? Don't use square brackets, or color the name like so:

[[00FF00]IAN[-]]
Title: Re: Problem with string format
Post by: Alessaint on July 16, 2012, 12:33:27 AM
Oh, I see...

Thanks a lot!