Here is my code:
public class checklevelcheckskill : MonoBehaviour {
public string PlayerSKillPointsS;
public int RequiredSkillLevelForUpgrade;
public int PlayerSkillPointsInInt;
//BUttons and Menus
public GameObject SkillPointsWarningMenu;
//Written Variables
// Use this for initialization
public void Start ()
{
RequiredSkillLevelForUpgrade = 0;
SkillPointsWarningMenu.active = false;
}
// Update is called once per frame
void Update ()
{
PlayerPrefs.GetString("PlayerSkillPoints");
PlayerSKillPointsS = PlayerPrefs.GetString("PlayerSkillPoints");
PlayerSkillPointsInInt = PlayerSKillPointsS;
}
}
Im getting this error: Cannot implicitly convert type ‘string’ to ‘int’ And when I changed my script to this,
public class checklevelcheckskill : MonoBehaviour {
public string PlayerSKillPointsS;
public int RequiredSkillLevelForUpgrade;
public int PlayerSkillPointsInInt;
//BUttons and Menus
public GameObject SkillPointsWarningMenu;
//Written Variables
// Use this for initialization
public void Start ()
{
RequiredSkillLevelForUpgrade = 0;
SkillPointsWarningMenu.active = false;
}
// Update is called once per frame
void Update ()
{
PlayerPrefs.GetString("PlayerSkillPoints");
PlayerSKillPointsS = PlayerPrefs.GetString("PlayerSkillPoints");
PlayerSkillPointsInInt.ToString() = PlayerSKillPointsS;
}
}
Now Im getting this error: The left-hand side of an assignment must be a variable, property or indexer
I just want first variable to be equal to second one. PlayerSkillPointsInInt = PlayerSKillPointsS;
Are there anybody knows how to solve this problem? Thanks For Your Help.