- Home /
What to do when you can't make scripts
Every time I try to make a script if I even make one and don't even type anything it says internal compiler error I tried unistalling and reinstalling but that didn't work how can I fix this.
I don't even type anything or change the name I just click make C# or JavaScript and click enter when it pops up I don't change the name I don't even edit it but it still says internal compiler error really frustrating.
This is a silly question, but have you rebooted your PC? That's always the first thing I do when I hit these annoying issues. Also, have you imported any assets lately? Sometimes when I import some assets, I get similar issues and they are hard to debug.
Are you creating the script in Unity, or in monodevelop/visual studio? Just to be sure, make sure you are creating it in Unity...
can you show us an example? Not long ago someone was using C# heading ( using unity engine etc etc ) but coding with unityscript ( "function OnTriggerEnter" type stuff) and got those complile errors. Another poster had changed the file name of his script. where in the script it will say "public class enemyAttack : $$anonymous$$onoBehaviour {" but he changed the file name to something else and got the compile error. If you create a script and call it "enemyAttack" that is what C# puts in the class line so rena$$anonymous$$g the file itself breaks things. WOw I just noticed this is 3 year old post. I hope you found a solution by now
Answer by DimensionU · Dec 11, 2014 at 11:51 AM
Does your script filename has spaces in it? "MyScript" will work, while "My Script" will not.
Your answer
Follow this Question
Related Questions
Accessing variables from different scripts. 3 Answers
Can't Add Scripts, even if they are very first in project and brand new 1 Answer
beginner question- several errors 1 Answer
modifying scripts for mobile 0 Answers
Script is not working 2 Answers