PutOnPath [iTween error]

I’ve used iTween with great success for a while now…but today I encountered this error and I can’t figure it out for the life of me.

Using the visual path editor, I created a path called “items”. In another script, I’m trying to place a game object on said path.

my Start function looks like this:

iTween.PutOnPath(gameObject,iTween.Hash("path" , iTweenPath.GetPath("items")),5.0f);

when I run the scene, it returns this error:

Assets/objectOnPath.js(3,25): BCE0023: No appropriate version of 'iTween.PutOnPath' for the argument list '(UnityEngine.GameObject, System.Collections.Hashtable, float)' was found.

I’ve remade it in C#, and it states the same error, and also notes that the problem lies with the second argument. It seems to want a Vector3, but instead gets a Hashtable. I haven’t had this problem with any of the other iTween functions though. What on earth is going on?!

Link to function: iTween for Unity by Bob Berkebile (pixelplacement)

Thanks for any/all help, cheers

Solution:

I still for the life of me cannot figure out how to get PutOnPath working…but I found a work around that solves the problem - PointOnPath.

Simply instantiate the object, create a Vector3 on the path, and set it to the object’s position:

var tempPoint :Vector3 = iTween.PointOnPath(iTweenPath.GetPath("path_name_here"), 0.50);
gameObject.transform.position = tempPoint;

0.50 is 50%. be sure that the last value is between 0 and 1

cheers