so this is the script
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class LevelSelectManager : MonoBehaviour {
public string[] levelTags;
public GameObject[] locks = new GameObject[1];
public bool levelUnlocked;
// Use this for initialization
void Start () {
for(int i =0; i < levelTags.Length; i++)
{
if (PlayerPrefs.GetInt (levelTags [i]) == null)
{
levelUnlocked [i] = false;
} else if (PlayerPrefs.GetInt (levelTags [i]) == 0)
{
levelUnlocked [i] = false;
} else {
levelUnlocked [i] = true;
}
if (levelUnlocked [i])
{
locks[i].SetActive (false);
}
}
}
// Update is called once per frame
void Update () {
}
}
the problems am having are:
1: (18,20): warning CS0472: The result of comparing value type int' with null is always
false’
2: (20,19): error CS0021: Cannot apply indexing with [ ] to an expression of type bool' 3: (23,19): error CS0021: Cannot apply indexing with [ ] to an expression of type
bool’
4: (25,19): error CS0021: Cannot apply indexing with [ ] to an expression of type bool' 5: (28,22): error CS0021: Cannot apply indexing with [ ] to an expression of type
bool’