Hi guys, i'm trying to carry over my final/best score into new script but its taking a 0 value..

using UnityEngine;
using System.Collections;

public class ScoreBoard : MonoBehaviour
{

public GameObject m_new;
public Score m_score;
public Score m_best;
public int best;
public int final;

public GameObject m_spriteBronze;
public GameObject m_spriteSilver;
public GameObject m_spriteGold;

public int m_bronze = 10;
public int m_silver = 20;
public int m_gold = 30;

// Use this for initialization
void Start () 
{

}

// Update is called once per frame
void Update () 
{

}

public int setScore(int score)
{

	if(m_gold <= score)
	{
		m_spriteGold.SetActive(true);
	}
	else if(m_silver <= score)
	{
		m_spriteSilver.SetActive(true);
	}
	else if(m_bronze <= score)
	{
		m_spriteBronze.SetActive(true);
	}

	string key = "best";
	int best = PlayerPrefs.GetInt(key);
	if(best < score)
	{
		PlayerPrefs.SetInt(key, score);
		best = score;
		m_new.SetActive(true);
	}
	m_score.setScore (score);
	m_best.setScore (best);

	int final = (best);

	Debug.Log(final);

	return final;

}

}

don’t use final as a var name final is a reserved word use something else and you use setScore inside its decleration , it must be used outside method decleration