iTween problem - oncompleteparams

I have this function I want to pass a “false” to using oncompleteparams. I’m doing something simple wrong.

public void DisableFreeCam(bool trueorfalse)
{
	RightClickFreeCam.disableFreeCam = trueorfalse;
}

DisableFreeCam(true) works elsewhere in the script, but this iTween code won’t work:

iTween.LookTo(Main.PLAYER, iTween.Hash("looktarget", lookToTarget.transform.position, "time", lookTime, "oncomplete", DisableFreeCam, "oncompleteparams", false ));

I get 4 errors:

  • The best overloaded method match for ‘iTween.Hash(params object)’ has some invalid arguments
  • Argument #6’ cannot convert method group’ expression to type ‘object’
  • The best overloaded method match for ‘iTween.LookTo(UnityEngine.GameObject, System.Collections.Hashtable)’ has some invalid arguments
  • Argument #2’ cannot convert ‘object’ expression to type ‘System.Collections.Hashtable’

iTween.LookTo(Main.PLAYER, iTween.Hash(“looktarget”, lookToTarget.transform.position, “time”, lookTime, “oncomplete”, “DisableFreeCam”, “oncompleteparams”, false ));

you are missing “oncompletetarget” probably