Need a little help with strict typing

Hi there,

I’m trying to convert my code to work on the iphone but I’m having a little trouble with strict typing.
I’ve managed to figure most things out but these few errors are still getting me.

With the code below I still get
‘renderer’ is not a member of ‘UnityEngine.Object’.
and
‘transform’ is not a member of ‘UnityEngine.Object’.
Does anyone know how I could fix these?
Thanks
Pete

for (var y : float = 0; y < LevelsCompleted; y++) 
	{
		var TargetPos = GameObject.Find("LRef_"+(y+1));
		var CreatedLevelButton = Instantiate(LevelButton, Vector3(0, 0, 0), Quaternion.identity);
		CreatedLevelButton.renderer.material.SetTexture("_MainTex", LevelButtonTexture[y]);
		CreatedLevelButton.transform.parent = TargetPos.transform;
		yield new WaitForSeconds (LevelButtonSeperation); 
		CreatedLevelButton.name = ("L"+(y+1));
		LevelButtonsAreUp = true;
	}
}

I got it,
I had to type
var CreatedLevelButton : GameObject = Instantiate(LevelButton, Vector3(0, 0, 0), Quaternion.identity);

I was looking in the wrong spot… :sweat_smile:

Aaarrrgggh!
I thought I had it but now I’m haunted by these
The name ‘Move_Camera’ does not denote a valid type.

It seems to be to do with this part of my script but I can’t figure out what’s wrong with this bit,

var script = CameraController.GetComponent(“Move_Camera”) as Move_Camera;

Any Ideas? My brain is about to explode…

oh crap…
It was a spelling mistake…
Sorry about that,
i think i should take a break for a while… :sweat_smile: