x


Compiler errors

I started a new project and wrote this script:

function Update() { if(Input.GetButtonDown("Jump")) { transform.position.z += 1.0; } }

I fixed all the errors in the rest of the code and tested building everything in MonoDevelop. There wasn't any problem. But when I try to add that script to my main camera or test the game outside of MD, It tells me I have to fix all compilation errors and gives me this message in the console:

Internal compiler error. See the console log for more information. output was:Assets/Standard Assets/Scripts/General Scripts/ActivateTrigger.cs(43,58): warning CS0618: UnityEngine.GameObject.active' is obsolete: GameObject.active is obsolete. Use GameObject.SetActive(), GameObject.activeSelf or GameObject.activeInHierarchy.' Assets/Standard Assets/Scripts/General Scripts/ActivateTrigger.cs(53,58): warning CS0618: UnityEngine.GameObject.active' is obsolete: GameObject.active is obsolete. Use GameObject.SetActive(), GameObject.activeSelf or GameObject.activeInHierarchy.' Assets/Standard Assets/Scripts/Utility Scripts/MeshCombineUtility.cs(27,74): warning CS0618: UnityEngine.Mesh.GetTriangleStrip(int)' is obsolete: Use GetTriangles instead. Internally this function converts a list of triangles to a strip, so it might be slow, it might be a mess.' Assets/Standard Assets/Scripts/Utility Scripts/MeshCombineUtility.cs(130,73): warning CS0618: UnityEngine.Mesh.GetTriangleStrip(int)' is obsolete: Use GetTriangles instead. Internally this function converts a list of triangles to a strip, so it might be slow, it might be a mess.' Assets/Standard Assets/Scripts/Utility Scripts/MeshCombineUtility.cs(177,30): warning CS0618: UnityEngine.Mesh.SetTriangleStrip(int[], int)' is obsolete: Use SetTriangles instead. Internally this function will convert the triangle strip to a list of triangles anyway.'

Unhandled Exception: System.UnauthorizedAccessException: Access to the path "C:UsersShilohDocumentsSpiriaTempAssembly-CSharp-firstpass.dll.mdb" is denied.

at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) [0x00000] in :0

at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean isAsync, Boolean anonymous) [0x00000] in :0

at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access) [0x00000] in :0

at Mono.CompilerServices.SymbolWriter.MonoSymbolWriter.WriteSymbolFile (Guid guid) [0x00000] in :0

at Mono.CSharp.SymbolWriter+SymbolWriterImpl.WriteSymbolFile () [0x00000] in :0

at Mono.CSharp.SymbolWriter.WriteSymbolFile () [0x00000] in :0

at Mono.CSharp.CodeGen.Save (System.String name, Boolean saveDebugInfo, Mono.CSharp.Report Report) [0x00000] in :0

at Mono.CSharp.Driver.Compile () [0x00000] in :0

at Mono.CSharp.Driver.Main (System.String[] args) [0x00000] in :0

What do I do?

more ▼

asked Feb 19, 2013 at 01:26 AM

Taojaz gravatar image

Taojaz
1 1 4 4

Do you have any files in the project that are completely blank? If you clear the Console window, are there any error messages?

Feb 19, 2013 at 06:03 AM robertbu

Get rid of the standard assets, for starters. You should generally only import them when you need them (there's no reason to have them lying around unused, especially if they seem to be causing errors).

Feb 19, 2013 at 06:07 AM syclamoth

It looks as though you may be trying to use "UnityEngine.GameObject.active" which is obsolete (this should only cause a warning however and wouldnt cause your game to stop). As to your other errors I would try clicking 'Refresh' and 'Sync MonoDevelop Project' from the 'Assets' menu. I think something is getting borked between Unity and MonoDevelop .

Feb 19, 2013 at 07:24 AM Starkid225
(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

What you've pasted is a list of warnings an errors. Your problem is the Unhandled Exception. This "Access to the path" error usually means the file is read-only, but the compiler is trying to replace it with a new version. Is your source control locking the file?

It is safe to ignore the "is obsolete" warnings, that won't keep the game from playing correctly.

more ▼

answered Jul 10 at 02:50 AM

MrPhil gravatar image

MrPhil
135 1 8 11

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x548
x65

asked: Feb 19, 2013 at 01:26 AM

Seen: 3389 times

Last Updated: Jul 10 at 03:04 AM