Why do I get " BCE0019: 'renderer' is not a member of 'Object'. "?

I have done “Debug.Log(…)” and it returns the objects that I want to access, but I keep getting this error. Does anyone know what I did wrong? Thanks!

enter code herevar testStar : GameObject;
var testLine : GameObject;
var testShader : Shader;
var testTexture : Texture;
var testStars = new ArrayList();
var testLines = new ArrayList();

function createMap()
{
 
	for(var i : int = 0; i<=10; i++)
	{
		var scale : float = Random.Range(1,10);
		testStar = GameObject.CreatePrimitive(PrimitiveType.Sphere);
		testStar.name = "testStar" + i;
		testStar.transform.position = Vector3(Random.Range(-10,20),Random.Range(5,20),Random.Range(-10,20));
		testStar.transform.localScale = Vector3(scale,scale,scale);
		testStars.Add(testStar);
		
		testLine = GameObject.CreatePrimitive(PrimitiveType.Cylinder);
		testLine.name = "testLine" + i;
		testLine.transform.position = testStar.transform.position;
		testLine.transform.localScale = Vector3(0.5, 9, 0.5);
		testLine.renderer.material.color = Color.red;
		testLines.Add(testLine);
	}
}

function Start () 
{
	var testShader = Shader.Find("Unlit/Texture");
	var testTexture = Resources.Load("blueStar1");
	Debug.Log(testTexture);
	createMap();
	for(var i:int = 0; i<=10; i++)
	{
		Debug.Log(testStars*);*

_ testStars*.renderer.material.mainTexture = testTexture;*_

* }*
}

function Update ()
{

}

On which line number do you get the error?

http://unity3d.com/search?refinement=answers&gq=BCE0019

Tells me that it might because you have not given the variables a type.

I also see that you have declared testTexture and testShader twice, once with a type, at top of script, and once in start.

If you did not mean to have a new local variables in start, change lines around 31 to:

testShader = Shader.Find("Unlit/Texture");
testTexture = Resources.Load("blueStar1");

Don’t use ArrayList; it’s untyped and not really any better than Array. Use built-in arrays or generic Lists, which are correctly typed.