I get a total of 9 errors from this script. Here is an image of the errors I got:
(And here is the script which has these errors, may someone please fix it?)
using UnityEngine;
using System.Collections;
public class MenuManager : MonoBehaviour
{
public string CurrentMenu;
public string MatchName = "";
public string MatchPassword = "";
public int MaxmatchPlayers = 32;
void Start()
{
CurrentMenu = "Main";
}
void OnGUI()
{
if(CurrentMenu == "Main")
Menu_Main();
if(CurrentMenu == "Lobby")
Menu_Lobby();
if(CurrentMenu == "Host")
Menu_HostGame();
}
public void NavigateTo(string nextmenu)
{
CurrentMenu = nextmenu;
}
private void Menu_Main()
{
if(GUI.Button(new Rect(10, 10, 200, 50), "Host game"))
{
NavigateTo("Host");
}
}
private void Menu_HostGame()
{
//Buttons Host Game
if(GUI.Button(new Rect(10, 10, 50, 50), "back"))
{
NavigateTo("Main");
}
if(GUI.Button(new Rect(60, 10, 200, 50), "Start Server"))
{
}
GUI.Label(new Rect(300, 10, 130, 30), "Match Name");
MatchName = GUI.TextField(new Rect(400, 10,200, 30), MatchName);
GUI.Label(new Rect(300, 50, 130, 30), "Match Password");
MatchPassword = GUI.PasswordField(new Rect(400, 50, 200, 30), MatchPassword, '*');
GUI.Label(new Rect(300, 90, 130, 30), "Match Max Players");
string maxuser = GUI.TextField(new Rect(400, 90, 200, 30), MatchMaxPlayers.ToString());
MatchMaxPlayers = Interpolator.Parse(maxuser);
MatchMaxPlayers = Mathf.Clamp(MatchMaxPlayers, 8, 32);
}
private void Menu_Lobby()
{
}
}