scaling a GameObject

Hello guys,

sorry, I am a bad programmer and ill and probably shoulg go to bed right away.

Why do I get a CS0266: Cannot implicitly convert type float' to int’. An explicit conversion exists (are you missing a cast?) for this:

Tileset[x,z].transform.localScale = new Vector3(1.0f, 1.0f, 0.85f);

Many thanks!

Edit:
More interestingly I get this error 10 times (!) all pointing to these 3 lines of code:

			Tileset[x,z].transform.localScale = new Vector3((float)1.0f, (float)1.0f, (float)0.85f);
			Vector3 temp_Vec = new Vector3(Tileset[x,z].transform.position.x, Tileset[x,z].transform.position.y, Tileset[x,z].transform.position.z);	
			Tileset[x,z].transform.position = new Vector3(-3.0f,temp_Vec.y, temp_Vec.z);

Also confusing to me: The same code is used in the same script once more a few hundret lines above. Any hints?

Hmm. It’s a little tough. Vector3 takes floats, so there’s no conversion there. Sometimes an error corresponds to the line above the one it posts. There isn’t any conversion from float to int on that line unless x and z are floats and getting used for ints in Tileset[x,z]. That could be a possibility because x and z are also used as float coordinates on transforms.