Author Topic: Problem with string format  (Read 3983 times)

Alessaint

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 67
    • View Profile
Problem with string format
« 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.


ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Problem with string format
« Reply #1 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[-]]

Alessaint

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 67
    • View Profile
Re: Problem with string format
« Reply #2 on: July 16, 2012, 12:33:27 AM »
Oh, I see...

Thanks a lot!