I applied this script to a game object but there’s errors
2 errors I get are==
Assets/dart/opendoor.cs(53,1): error CS8025: Parsing error
Assets/dart/opendoor.cs(18,17): error CS1525: Unexpected symbol }‘, expecting ;’
using UnityEngine;
using System.Collections;
public class opendoor : MonoBehaviour {
void Start ()
{
number = 0;
codeLength = 5; //Count the number of characters in your code and that will be the code length (duh)
}
void Update ()
{
if (number == 0 && Input.GetKeyDown("3"))
{
number += 1
//"number" now equals 1
}
if (number == 1 && Input.GetKeyDown("2"))
{
number += 1
//"number" now equals 2
}
if (number == 2 && Input.GetKeyDown("h"))
{
number += 1
//"number" now equals 3
}
if (number == 3 && Input.GetKeyDown("o"))
{
number += 1
//"number" now equals 4
}
if (number == 4 && Input.GetKeyDown("t"))
{
number += 1
//"number" now equals 5
}
if (number == codeLength)
{
//opendoor
}
}