I keep getting the same error, can anybody help me by explaining why the problem appears, or at least give me the proper code?:
Assets/Scripts/TurretScript.js(72,17): BCE0023: No appropriate version of ‘UnityEngine.Object.Instantiate’ for the argument list ‘(System.Type,
UnityEngine.Vector3, UnityEngine.Quaternion)’ was found.
…
THE CODE:
function FireProjectile()
{
audio.Play();
nextFireTime = Time.time+reloadTime;
nextMoveTime = Time.time+firePauseTime;
CalculateAimError();
for(theMuzzlePos in muzzlePositions)
{
Instantiate (myProjectile, theMuzzlePos.position, theMuzzlePos.rotation);
Instantiate (muzzleEffect, theMuzzlePos.position, theMuzzlePos.rotation);
}
}