iTween nullref error. Hashtable syntax problem? Not sure.

Any help?

So, I’ve got this short little iTween script that moves something up and down. But it just throws null ref errors every time I run the game. There doesn’t seem to be any logical explanation for why it stops–or why it throws the error. It’s an instantiated “clone” of an original object. The object actually moves as it’s supposed to. But there are still errors. And when I look for where the error is, it points to the line in iTween that states:

if(tweenArguments.Contains("looktarget") && isRunning){

It’s line 6453.
. Any idea what it could be? I feel like these are perfectly normal iTween calls…

Cheers
private var floatTime = 4;
private var floatDistance = 1;

function Awake() 
{
	iTween.MoveBy(gameObject, {"z" : floatDistance, "easetype" : "easeInOutCubic", "time": floatTime, "oncomplete" : "moveDown"});
}

function moveDown()
{
	iTween.MoveBy(gameObject, {"z" : floatDistance * -1, "easetype" : "easeInOutCubic", "time": floatTime, "oncomplete" : "moveUp"});
}

function moveUp()
{
	iTween.MoveBy(gameObject, {"z" : floatDistance, "easetype" : "easeInOutCubic", "time": floatTime, "oncomplete" : "moveDown"});
}

function fadeOut()
{
	iTween.FadeTo(gameObject, {"amount" : 0, "time":1.5, "easetype" : "easeInOutCubic"});
}

I had an unexpected Null Reference Exception from iTween happen to me when the iTween script was mysteriously set on a GameObject in the inspector. Perhaps that happened to you too.

Hi,

your script works without any errors.

Regards.

I had the exact same issue. It turns out, I was instantiating a GameObject twice. When I removed the 2nd one, no errors appeared in the Log.