How to access enum in another script?

Here is an error “BCE0004: Ambiguous reference ‘SaveOption’: SaveOption, SaveOption.”
I defined an enum SaveOption in a script SaveOption.js
How to use it in another class?

enum SaveOption
{
	SaveToFile,
	SaveToServer
};

Another class Scene.js

class Scene
{
	//New scene
	static function New(data:Hashtable)
	{
		print("new scene");
	}
	//Open scene
	static function Open(data:Hashtable)
	{
		print("open room");
	}
	//Save scene
	static function SaveAs(str:String,type:SaveOption)
	{
		switch(type)
		{
			case SaveOption.SaveToFile:
				
				break;
			case SaveOption.SaveToServer:
				
				break;
		}
	}
}

Use a different name for the enum and the class. Otherwise you don’t have to do anything; all enums are available to all scripts.

–Eric

i guess u have a class named SaveOption, so change. It nothing wrong about the remaining part of the code.

Oh thx,I changed the class name,it’s ok!