I have no idea how to fix a "pragma strict error : unrecognized pragma directive" error.
My "Ask a question" history is full of different posts about different problems I encountered on coding different games. I apologize. I decided to end this randomness problem and I'm going to stick with Pong.
This is the error I'm getting "Unrecognized pragma directive" on the first line of "MoveRacket.cs". I did a hasty Google search on it and my search came back with no working results so I posted on this forum. I'm guessing that I'm missing a compiler directive(?). That's about all I know. Can anyone help?
(My code is currently nothing because I'm just starting)
#pragma strict
var moveUp : KeyCode;
var moveDown : KeyCode;
Function Update()
{
}
Answer by Meguia · Feb 22, 2018 at 05:27 AM
Hi @Brian-Washechek
I think that your problem is the same here, you are using JS syntax within a C# file.
Change your file extension to .js and let me know if it works.
Good luck with your game!
Your answer
Follow this Question
Related Questions
Bizarre compile errors in Unity while Visual Studio will build project successfully 0 Answers
Failed to compile resorces with the following parameters 0 Answers
It works great on editor, but I need it to work on my build. (UnityEditor.TransformUtils) 3 Answers
Unable to load project - specified pathname not found compilation error 0 Answers
CS8025 Parsing Error 0 Answers