Can someone please help with C#?

Hello. I have script that I am using to control the spawn rate of prefabs (written in C#) and I have some other code written in javascript that I am using to control where prefabs spawn. I want to combine these, can someone please translate the javascript to C#? Thank you

//Assumes Vector3's for the minimum and maximum positions
Instantiate(prefab, Vector3(Random.Range(minimum.x,maximum.x),
                            Random.Range(minimum.y,maximum.y),
                            Random.Range(minimum.z,maximum.z)),
            Quaternion.LookRotation(center));

And, if for some reason its needed here is the C# script

using UnityEngine; using System.Collections;

public class Spawn : MonoBehaviour {

public Transform[] ObjectsToSpawn;
public float SpawnInterval= 15;
public int MaxObjectsSpawned = 8;
public int MinObjectsSpawned = 3;

private float _NextSpawn;

void Start () { 
    _NextSpawn = Time.time + SpawnInterval;
}

void Update () {
    if(Time.time >= _NextSpawn) {
        int objectsToSpawn = Random.Range(MinObjectsSpawned, MaxObjectsSpawned);
        for (int i = 0; i < objectsToSpawn; i++) {
            Instantiate(ObjectsToSpawn[Random.Range(0, ObjectsToSpawn.Length)], transform.position, Quaternion.identity);
        }
        _NextSpawn = Time.time + SpawnInterval;
    }
}
}

recommand unity help

Instantiate(prefab, new Vector3( Random.Range(minimum.x,maximum.x),

Random.Range(minimum.y,maximum.y),

Random.Range(minimum.z,maximum.z)),

Quaternion.LookRotation(center));

only difference is new operator

The errors you keep getting are likely from not initializing the variables `minimum`, `maximum`, and `center`. You'll need to stick this in there along with the other variables:

    public Vector3 minimum;
    public Vector3 maximum;
    public Vector3 center;

It seems that you haven't written many scripts on your own, only asked questions and then asked people to help you combine the scripts from the answers. If you want a tutorial on scripting there's a good one here. Or try going to the Unity scripting manual:

http://unity3d.com/support/documentation/ScriptReference/index.html

When you're able to write scripts on your own you'll be able to get things done a lot faster than if you just wait for answers here. (Really recommend learing how to script!) :)