I get a like 10 errors from entering the for int portion of code. AM i missing a core plugin for this?
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using TMPro;
public class Quiz : MonoBehaviour
{
[SerializeField] TextMeshProUGUI questionText;
[SerializeField] QuestionSO question;
[SerializeField] GameObject[] answerButtons;
void Start()
{
questionText.text = question.GetQuestion();
}
{
for (int i = 0; i < answerButtons.Length; i++)
{
TextMeshProUGUI buttonText = answerButtons[i].GetComponentInChildren<TextMeshProUGUI>();
buttonText.text = question.GetAnswer(i);
}
}
}
Assets\Scripts\Quiz.cs(18,5): error CS1519: Invalid token ‘{’ in class, record, struct, or interface member declaration
Assets\Scripts\Quiz.cs(19,20): error CS8124: Tuple must contain at least two elements.
Assets\Scripts\Quiz.cs(19,20): error CS1026: ) expected
Assets\Scripts\Quiz.cs(19,20): error CS1519: Invalid token ‘=’ in class, record, struct, or interface member declaration
Assets\Scripts\Quiz.cs(19,49): error CS1003: Syntax error, ‘>’ expected
Assets\Scripts\Quiz.cs(19,49): error CS1519: Invalid token ‘;’ in class, record, struct, or interface member declaration
sets\Scripts\Quiz.cs(19,52): error CS1519: Invalid token ‘++’ in class, record, struct, or interface member declaration