The type or namespace function could not be found

function OnTriggerEnter (Collider other) {
Application.LoadLevel(“First Person Whatever”);

What do I do here? All I want is to change the level when something collides with a specific cube, but it doesn’t seem MonoDevelop knows what a function is. It comes up with the error

"The type or namespace 'function' could not be found".

I'm very new to unity, so please don't be dissapointed.

MonoDevelop doesn’t know what “function” is. It knows what text is. It knows what symbols are. It also knows about compilers, and tell compilers to compile the source text files.

The UnityScript compiler knows what “function” is.

The C# compiler doesn’t know what “function” is.

Your code is mixing UnityScript (“JavaScript”) and C#.

You most likely made a C# script and put UnityScript syntax into it (“function” is a UnityScript keyword, the parameter list is in C# syntax).

Decide if you want to write UnityScript or C# code.

Then change the entire script into either UnityScript or C# code.

Then make sure your file extension is either .js (UnityScript) or .cs (C#).