how to put a texture on my generated floor.

Hello i created a script and i wanted to use my own cube prefab with the textures on it and use it in the script but does not work. here’s the script:

for (var y = -4; y < 30; ++y)
    for (var x = -4; x < 30; ++x) {
        var block : GameObject = GameObject.Find("block")(PrimitiveType.Cube);
        block.transform.position = transform.position + Vector3(x, 0, y); 
    //it says block is not a member of the unity something.

im not moving a cube at all learn how to code dick its spawning a floor full of cubes and how is that moving a cube idiot!