- Home /
weird false cs0103 error in monodevelop
Not exactly sure why, but all of a sudden when I use a line like
StartCoroutine("blablaFunction");
in monodevelop it becomes red, and when i hover over it, i get error CS0103, "StartCoroutine' does not exist in the current context ". The problem is, it was working before and it STILL works. The Unity editor sees no problem and the project runs fine in spite of monodevelop seeing an error. Everything works, but code is peppered with false errors and its annoying. Any idea what would do this?
Answer by siryami · Dec 31, 2015 at 03:20 PM
Found the solution, although doesn't make much sense. I was going over changes I've made to the project and one of them was turning was making a class using the AWS sdk. In the examples, they used a namespace, so I kept as well in my new class. I also made it a singleton.
So i removed the reference to singleton and saved, everything went back to normal, I put it back and saved, everything was still normal.
So I am guessing this is some kind of glitch.
Answer by Shadowlash1221 · Dec 31, 2015 at 09:44 AM
See if this helps!
http://answers.unity3d.com/questions/742277/error-cs0103-2.html
Answer by unityBerserker · Sep 02, 2016 at 01:13 PM
Same problem we can generate when we delete elements in project in reference folder. Some place in code will be mark to red.
Easiest way to solve this red kind of problem is to mark in Solution window - one in your solutions(pink icon).
Next from context menu take "Open Containing Folder".
It probably open directory on disk where is your Unity project (same folder containing Assets, Library, etc).
Close Monodevelop.
Mark in this folder all files with .sln and .csproj extention and delete them.
Open again your script from Unity.