Hi guys i have a problem.I have set all some of my int into string to work with another script(only chance for the script to work) and now i cant multiply the value of that string so i converted the involved one into a int and found another way.
I need to change that int into a string for that function only and change it back when its done.Then i cant multiply it however i want.
if (CurLevel >= MaxLevel)
{
CurLevel = MaxLevel;
}
int ExpToLevel : String;
ExpToLevel = ExpToLevel.ToString();
int result = string.Compare(Exp, ExpToLevel);
if (result == 0);
else if (result > 0) // More than enough
{
CurLevel++;
NextLevel = CurLevel + 1;
//ExpToLevel *= 2;
if(Network.peerType != NetworkPeerType.Disconnected)
{
NetworkManager.Instance.MyPlayer.Manager.networkView.RPC("UpdateRank",RPCMode.All,CurLevel);
PlayerPrefs.GetString("PlayerScore" + NetworkManager.Instance.PlayerName, Exp);
Debug.Log("RankManager Getting Int");
}
}
}
}
I need the (//ExpToLevel to be an int on line 13) but need it to be string on line (7)
if i dont convert it to string my other scripts wont work because i tried int and dint work.Here’s my other thread (Not receiving exp - Unity Answers).thanks