Hey, I wanted to ask, I am makin’ a online FPS (trying to make
), and I wrote this script in C#
using UnityEngine;
using System.Collections;
public class NewBehaviourScript : MonoBehaviour
{
public string CurrentMenu;
void Start()
{
CurrentMenu = “Main”;
}
void OnGUI ()
{
if (CurrentMenu == “Main”)
Menu_Main;
if (CurrentMenu == “Lobby”)
Menu_Lobby;
}
private void Menu_Main()
{
GUI.Button(new Rect(10,10,200,50), “Host Game”);
}
private void Menu_Lobby()
{
}
}
And C# tells that the yellow word’s are wrong, it shows me this:
Only assignment, call, increment, decrement, and new object expressions can be used as a statement (CS0201)
Please, give me a solution because I looked up the internet, and tried a lot of methods, but nothing works, I tried to repair the script by my self, but then other error come up, PLEASE HELP!