Asset Bundle export script 'Cannot convert' error

Hiya! I’ll start by saying that I have nearly no C# experience/knowledge at all, and am learning as I go.
I’m attempting to modify the asset bundle export script provided in the Unity 5 documentation to suit my needs, and have run into a pair of errors that I can’t find a solution for: Error CS1503: Argument ‘3’: cannot convert from ‘UnityEditor.BuildAssetBundleOptions’ to ‘UnityEditor.BuildTarget’

Error CS1502: The best overloaded method match for ‘UnityEditor.BuildPipeline.BuildAssetBundles(string, UnityEditor.AssetBundleBuild, UnityEditor.BuildAssetBundleOptions, UnityEditor.BuildTarget)’ has some invalid arguments

The script is as follows

using UnityEditor;

public class CreateAssetBundles
{
	[MenuItem ("Assets/Build AssetBundles")]
	static void BuildAllAssetBundles ()
	{
		BuildPipeline.BuildAssetBundles ("AssetBundles" , BuildAssetBundleOptions.DisableWriteTypeTree, BuildAssetBundleOptions.UncompressedAssetBundle, BuildTarget.StandaloneWindows);
	}
}

From what I’ve gathered, the error results from having both the BuildAssetBundleOptions.DisableWriteTypeTree and BuildAssetBundleOptions.UncompressedAssetBundle variables in at the same time.

Any help is appreciated.

Well, I’ve solved the problem myself :slight_smile:

On line 8 I needed to add a | in the middle of BuildAssetBundleOptions.DisableWriteTypeTree, BuildAssetBundleOptions.UncompressedAssetBundle

I was trying to make a Unity 5 asset bundle work in a Unity 4 game, but it appears they are incompatible.