# error: in FMOD\_StudioSystem

**URL:** <https://qa.fmod.com/t/error-in-fmod-studiosystem/13582>\
**Category:** Unity\
**Created:** [December 8, 2017, 4:19pm UTC](https://qa.fmod.com/t/error-in-fmod-studiosystem/13582 "2017-12-08T16:19:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![SimonZ](https://avatars.discourse-cdn.com/v4/letter/s/dfb087/32.png) [@SimonZ](https://qa.fmod.com/u/SimonZ)\
**Post date:** [December 8, 2017, 4:19pm UTC](https://qa.fmod.com/t/error-in-fmod-studiosystem/13582/1 "2017-12-08T16:19:18Z")

</div>

Hey folks,

I’m want to change the value of an FMOD-Event but I keep getting the following error messages in Unity:

ERROR1 = “The name `FMOD\_StudioSystem’ does not exist in the current context”  
and  
ERROR2 = “The left-hand side of an assignment must be a variable, a property or an indexer”

the code for that is the following:

```
private FMOD.Studio.EventInstance boidActive;
private FMOD.Studio.ParameterInstance filter; 

void Start ()
{
	//ERROR MESSAGE 1
	boidActive = FMOD_StudioSystem.instance.GetEvent ("event:/boid_sound");

	if (boidActive.getParameter("filter", out filter) != FMOD.RESULT.OK)
	{
		Debug.LogError("filter parameter not found on boid_sound event");
		return;
	}

	boidActive.start();
}

void Update () 
{
            //ERROR MESSAGE 2
            filter.setValue = (this.transform.position.x);
	Debug.Log(this.transform.position.x);
}

```

where “boid\_sound” is the event in FMOD and “filter” is the parameter I want to control

Any help would be very much appreciated!

cheers,  
Simon

---

<div class="post-metadata">

**Author:** ![cameron-fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/cameron-fmod/32/261_2.png) [@cameron-fmod](https://qa.fmod.com/u/cameron-fmod)\
**Post date:** [December 10, 2017, 9:29pm UTC](https://qa.fmod.com/t/error-in-fmod-studiosystem/13582/2 "2017-12-10T21:29:33Z")

</div>

FMOD\_StudioSystem isn’t the correct class to use, unless it is one you have made yourself.

FMODUnity.RuntimeManager.StudioSystem will give you a reference to the current Studio System, see our docs for more info:  
[https://www.fmod.com/resources/documentation-api?page=content/generated/engine\_new\_unity/scripting.html#/](https://www.fmod.com/resources/documentation-api?page=content/generated/engine_new_unity/scripting.html#/)

The second issue is that setValue is a function and not a variable, so you would use it like this:

```
filter.setValue( transform.position.x );

```

[https://www.fmod.com/resources/documentation-api?page=content/generated/FMOD\_Studio\_ParameterInstance\_SetValue.html#/](https://www.fmod.com/resources/documentation-api?page=content/generated/FMOD_Studio_ParameterInstance_SetValue.html#/)
