- Home /
Part of string not showing
Hey guys! I had a small problem: Part of my string is not showing. Can someone help me out? The debug is actually called correctly as it should.
if(NetworkManager.Instance.MyPlayer.plRank == 1)
{
Debug.Log("Player rank is equal to 1");
GUI.Label(new Rect(Screen.width/2, k.Row * rowHeight, Screen.width * (3.0f/2.3f), Screen.height * (0.3f/6.3f)), string.Format("You terminated <color=blue>{0}</color>", k.Killed, "(" + NetworkManager.Instance.MyPlayer.plRank.ToString() + "st" + ")"));
}
The part of the string that is not showing is this one:
"(" + NetworkManager.Instance.MyPlayer.plRank.ToString() + "st" + ")"
The rest shows perfectly as it should.
Comment
Best Answer
Answer by nicolasjr · Apr 13, 2014 at 04:01 PM
I believe that your problem is at the comma you're using, when you should be using the + sign:
GUI.Label(new Rect(Screen.width/2, k.Row * rowHeight, Screen.width * (3.0f/2.3f), Screen.height * (0.3f/6.3f)), string.Format("You terminated <color=blue>{0}</color>" + k.Killed + "(" + NetworkManager.Instance.MyPlayer.plRank.ToString() + "st" + ")"));
Can you check that?
Your answer
Follow this Question
Related Questions
Need some help with understanding Extensions 0 Answers
Gui list and color 0 Answers
X.Text just uses random values 1 Answer
Changing two different objects renderer colour 1 Answer
Click GameObject to change Color 1 Answer