using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Hacker : MonoBehaviour {
// Use this for initialization
void Start ()
{
ShowMainMenu("Hello Donald!");
print("Hello" + "World");
}
void ShowMainMenu(string greeting)
{
Terminal.ClearScreen();
Terminal.WriteLine(greeting);
Terminal.WriteLine("Which company's credit card database ");
Terminal.WriteLine("would you like to hack into?");
Terminal.WriteLine("Press 1 for Sony");
Terminal.WriteLine("Press 2 for Nintendo");
Terminal.WriteLine("Press 3 for Microsoft");
Terminal.WriteLine("Make your selection:");
}
int level;
void OnUserInput(string input)
{
if (input == "menu") //boolean true or false
{
ShowMainMenu("Hello, welcome back,");
}
else if (input == "1")
{ StartGame();
}
else if (input == "007")
{
Terminal.WriteLine("Please select a level Mr.Bond");
}
else
{
Terminal.WriteLine("Please choose a valid level");
}
void StartGame()
{
Terminal.WriteLine("You have chosen level" + level);
}
}
}
ERRORS
44,9 keyword void cannot be used in this context
44,22 unexpected symbol
49,0 unexpected symbol