I can't build my project, how can I fix it?

I’m trying to build several projects but everytime I have the same problem: My project runs correctly but, when I try to build it, first I don’t be built (Im2.png) and then some script errors are showed as they are not part of the project (Im3.png). Can someone help me?

I might be wrong, but it looks like there is an issue with a pre-existing script. Unity wont build, or even run most times, the game until all the script bugs are fixed. If the script isn’t part of the project try removing it all together.

@fiterpilot Before I press the build button I have no script error in the console and the game runs correctly. Only after my try to build it, these problems appear.

make sure all of ur script names match their file names and it should work