hello
i am working on android game
and now i am working about high score
on the first scene
i did that code
if (score > PlayerPrefs.GetFloat(“BrickScore”))
{
PlayerPrefs.SetInt(“BrickScore”,score ) ;
}
then on the game over scene
i did that script
#pragma strict
var BScore : TextMesh ;
function Start () {
}
function Awake ()
{
BScore.text = PlayerPrefs.GetInt(“BrickScor”) ;
}
function Update () {
}
so on the script there is an error say
#pragma strict
var BScore : TextMesh ;
function Start () {
}
function Awake ()
{
BScore.text = PlayerPrefs.GetInt(“BrickScor”) ;
}
function Update () {
}
and that is the error appear to me (Cannot convert ‘int’ to ‘String’.)
so it is first time to me to work on player prefs
what i did wrong here ?