Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Game Development How to Make a Video Game Score, Enemies, and Game State Add a Start and End

James N
James N
17,864 Points

all of my scrips can't be loaded!

i don't get this. but whenever i take a look at one of my scripts, (or even unity's scripts) in the inspector for my file, it says: the associated script can not be loaded. Please fix any comple errors and assing a valid script. can someone help?

1 Answer

Alan Mattan贸
PLUS
Alan Mattan贸
Courses Plus Student 12,188 Points

OK, Just Please fix any error in your script. Explanation: When you make a new script you can make a mistake. The engine try to read it and it tells you there is an error. At this point you can't play a game with errors. First you need to return to the script and find the error. The console show there is the error, (the first one) , the name of the file, the text line and position. If you double click in the console first error, then it will take your to the error by opening mono develop and putting the cursor next to the error in red. if you fix it, then probably all the other errors will disappear.

If is this not the case as i suspect and you have big problems with all your scripts then you can try to recompile. Is a deep reboot. But first talk to an expert for this.

Other options: If the project is small like this case, Try to remove all your scripts from the asset. Then put them one by one.