i am new to unity and im having problem trying to make a star scoring system

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.SceneManagement;

public class QuizManager : MonoBehaviour
{
   public List QnA;
   public GameObject[] options;
   public int currentQuestion;

   public GameObject Quizpanel;
   public GameObject GoPanel;
	public GameObject Stars;

   public Text QuestionTxt;
   public Text ScoreTxt;
	public float scorePer;

   int totalQuestions = 0;
   public int score;
	

private void Start()
{ 
	totalQuestions = QnA.Count;
	GoPanel.SetActive(false);
	generateQuestion();
}


public void retry()
{
	SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex);
}

public void GameOver()
{
	Quizpanel.SetActive(false);
	GoPanel.SetActive(true);
	ScoreTxt.text = score + "/" + totalQuestions;

		scorePer = (correct / totalQuestions) * 100;

		ScoreTxt.GetComponent<Text>().text = "Score : " + scorePer" %";
		GetComponent<starsHolder>().starsAchieved();
}

public void starsAcheived()
	{
		int scoreWrong = QnA.Count;
		int scoreCorrect = totalQuestions - scoreWrong;

		float percentage = scoreCorrect / totalQuestions;

		if (percentage >= 33f && percentage < 66)
		{
			//one star
			Stars[0].SetActive(true);
		}
		else if (percentage >= 66 && percentage < 70)
		{
			//two stars
			Stars[0].SetActive(true);
			Stars[1].SetActive(true);
		}
		else
		{
			Stars[0].SetActive(true);
			Stars[1].SetActive(true);
			Stars[3].SetActive(true);
		}

	}

public void correct()
{
	//when you are right
	score += 1;
	QnA.RemoveAt(currentQuestion);
	generateQuestion();

}

public void wrong()
{
	//when you answer wrong
	QnA.RemoveAt(currentQuestion);
	generateQuestion();
}

void SetAnswers()
{ 
	for (int i = 0; i < options.Length; i++)
	{
		options*.GetComponent<AnswerScript>().isCorrect = false;*

options_.transform.GetChild(0).GetComponent().text = QnA[currentQuestion].Answers*;*_

* if(QnA[currentQuestion].CorrectAnswer == i+1)*
* {*
_ options*.GetComponent().isCorrect = true;
}
}
}*_

void generateQuestion()
{
* if(QnA.Count > 0)*
* {*
* currentQuestion = Random.Range(0, QnA.Count);*

* QuestionTxt.text = QnA[currentQuestion].Question;*
* SetAnswers();*
* }*
* else*
* {*
* Debug.Log(“Out of Questions”);*
* GameOver();*
* }*

}
}

Hello. You didnt ask any specyfic question. We will not read your code to try to find if something is wrong. you must know whats happening, where is happening, and then come to ask how to achieve what you pretend to do…

Post closed.

FAQ :

What are the guidelines for writing good questions?

We want Unity Answers to become a comprehensive database of questions and answers related to Unity. When you ask your questions, it can be helpful to keep a few things in mind:

Some reasons for getting a post rejected:

There exists duplicate questions with answers if you were to do a search, either on Answers or on the Forum or on Unity's tutorials

Your question isn't specific enough: asking for a script, asking multiple questions in one post or asking a question that could be either subjective or require extensive discussion

Your question is about very basic issues, that can be learned just by searching in google or in multiple basic tutorials for begginers