Error: BCE0018

I have an error in a script. It’s not mine script but I think its is a script from Unity itself (I downloaded AngryBots from the asset store). Everything went well, but maybe I deleted smt.

And if I put this script in comments, there only comes more errors in the place!

#pragma strict

public var qualityThreshhold : Quality = Quality.High;

function Start () {

	if (QualityManager.quality < qualityThreshhold)
	{
		gameObject.SetActive (false);
	}
	enabled = false;
}

error: Assets/Scripts/Fx/DeactivatorOnLowQuality.js(4,32): BCE0018: The name ‘Quality’ does not denote a valid type (‘not found’)

warnings:

invalid character

strict, var and : expected

Please format your code. Edit your question, select your code, and use the 101/010 button.

2 Answers

2

Based off the Implementation, you should have an enum some where that i know at least has a value of High. Looks like:

enum Quality 
{
  High, 
  OtherValue1,
  OtherValue2,
  Etc
}

Other than High, i’m just adding filler. This enum type is missing or can’t be found(renamed?). With that said, you’re declaring a variable of that type on this line:

public var qualityThreshhold : Quality = Quality.High;

and you’re setting it to the enum value of High, but again it can’t find it. Replace it, find it or define it and you’re good to go.

Note: there are a couple other options that are unlikely but possible that i won’t get into. You said you didn’t write this, go to the source and get the missing implementation if necessary.

Thanks for you help and time, but it doesn't work. I think it's easier to delete and download Unity back on my pc.

@ToonDeJonge, why would you re-install? Were you able to find the enum/class called Quality. The BCE0018 error/exception literally denotes a referenced type can not be found. Now if you did find it and couldn't reason why it wasn't able to find it(Unity) and you concluded there was an internal error, that makes sense. But if not, you're wasting your time redownloading and installing again, consider if you did the same thing as before you would get the same result.

@ToonDeJonge, if I helped, mark the question answered, if you did something else, else answer your question, mark it as the answer so people know in the future.

It says that I need reputation to do such thing. Your anwser is in green, is that enough?

It worked! My thanks to you sir!