- Home /
A few basic MonoDevelop Questions
Hello,
These are some relatively simple questions I imagine, as i'm just jumping in to coding.
I've been watching a couple of basic Javascript/Unityscript videos and i'm noticing some differences between my MonoDevelop and the person making the video's MonoDevelop.
First off, I notice when making a new Javascript file and opening it up in MonoDev I get a #pragma strict at the top, while in the tutorials i'm watching there is no #pragma strict. I also noticed if I delete it and begin writing code it comes up with a long error, which I can just press OK and continue typing. Could someone help me to understand what #pragma strict is, and whether or not it's important? Here's an image of the error for reference:
Lastly, in the videos I notice that the teacher is getting help from Monodevelop while typing code by it suggesting variables/functions from the API, yet when I type it doesn't suggest code from the API. I've tried messing around with the settings but nothing helps to turn this on. How do I get this up and running in MonoDevelop? Here's an image of what i'm referring to just in case i'm not calling it by it's correct name:
I'm running the latest version of both Unity and MonoDevelop, if that information's needed.
Thanks!
The fact that you are running the latest version of Unity is the explanation for the
#pragma strict
thing- 3.5 automatically adds that in script templates, which older versions did not. It makes the compiler more pedantic, forcing you to write better scripts. You should keep it, it stops you from making certain kinds of mistakes that are difficult to debug.
Also, that screenshot there doesn't look like either Unity or Javascript! $$anonymous$$ake sure that you have used 'Sync $$anonymous$$onodevelop Project' from the 'Assets' menu before you start- that sometimes fixes the autocomplete stuff.
Thanks so much for you fast response! Sync $$anonymous$$onodevelop Project definitely solved my issue with the autocomplete problem in $$anonymous$$onodevelop. With that it'll help me out with scripting a lot more.
I figured #pragma strict had something to do with a newer version, but wasn't aware that it helped me with writing better scripts. I'll be sure to keep it.
Thanks again!
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
How to implement leaderboard with social api 1 Answer
Are there any good free Master Server APIs? 0 Answers
MonoDevelop Won't Compile. Unity 4.2 2 Answers
Big city on IOS 1 Answer