UI crosshair help

For some reason I can’t see the variables in inspector
Somewhere on the open forums says that it might have compiling error:
Label with image works, I’ve seen it on a video, but could be outdated…
i assign it to my main camera -This is my code:

#pragma strict
public Texture2D crosshair; (tried with public var crosshair:Texture; )
public Texture2D crosshair_small;
function OnGUI()
{
GUI.Label (new Rect(Screen.width/3, Screen.height/2, 100, 100), crosshair);
GUI.Label (new Rect(Screen.width/3*2, Screen.height/2, 100,100), crosshair_small);
}

i removed the script and i still get the compiler error 0.o… all i have is 2 cubes on the scene

The OnGui stuff you are using is a bit outdated for in game use.
With the new uGUI it should be way easier (if you have 4.6 +).

You you are sure you like to use OnGUI code you may post the error you are getting. else its difficult for us to find out whats wrong.

For real… i cant believe the reason for error… it seems as i have copied the text from other editor it has caught a hidden char or sth… when i retyped it and deleted the old one it worked 0.o …

Actually it shouldn’t work!
Your variable definitions are c# syntax while your function has js syntax.
Oh, and as for OnGUI code itself. Using the new gui for something like a crosshair is total overkill and can cause clutter in your scene. OnGUI is the much better approach in this case IMO.