When I use this:
if(msg.userName == lines[0])
{
string str = msg.chatMessagePlainText.ToLower();
string[] AttCommand = str.Split(' ') ;
Debug.Log(AttackCommand[0]);
Debug.Log(AttackCommand[1]);
Debug.Log("Attack Command Called");
}
The first Debug says: #
The second: a
I want the first to say #attack
The second: (playername)
msg.chatMessagePlainText.ToLower() = #attack (playername)
I’m following: How to split string into two integers? - Questions & Answers - Unity Discussions trying to make two substrings instead.