Cannot edit javascript file

Hello, my problem is that when i create a new javascript file in the project panel i can’t open it. I double click on it on the project panel, or i click the open button on the inspector panel but i get the same result: a window titled “Windows Script Host” appears with the following content
Script: “path of my script file”
Line: 1
Char: 1
Error: Invalid character
Code: 800A03F6
Source: Microsoft JScript compilation error

Does anyone know a solution to this? Any help appreciated.

My eror code is the same as yours. Same problem.

Im not completly sure, but I think it could be because we use whats called the mono project. In About Unity you can see if its the mono version you have.

Think possible solution could be if we write the code in nodepad and then simply save it in the correct place. Just need to figure out how, I downloaded Unity for the first time yesterday, so hello world :slight_smile:

edit

This tutorial might help:

In Unity Preferences the program also let you know if you need to install additional stuff.

After I followed the video I dont get the error code anymore, however, I am still not able to write any code.

Just change the program that .js files open with in explorer.

Thanks for the reply.

Not sur if I done it correctly, but it is working now. Just pasted my first script from the tornado twins tutorial guys and its working :slight_smile:

Dont seem to get the error code anymore.

HELLO WORLD