Jump to content
Search Community

uninstantiated tweenlight throwing error??

maurik test
Moderator Tag

Recommended Posts

Hey,

I had some bugs in a badly written program, but one of them i didn't understand -

TweenLight threw an error in renderTime (value is not a function, meaning _ease), and i checked and found out that both _ease and target were null.

I checked if the constructor was being called and found out it wasn't.

How can an instance throw an error before it was instantiated?

Link to comment
Share on other sites

Its a bit big. its a lot of classes on top of a custom library, and the program is still very buggy on its own. it could take a lot of time for you to dig into it

 

 

if it helps, this is the list of what happened -

 

1 tweenlight through an error saying function is not a value, in function renderTime on the line -

this.ratio = _ease(time, 0, 1, this.cachedDuration);

(i have it on line 429, but my version of tweenlight is different from the official in one line where it checks whether the target is null in the constructor.)

 

i added a try catch to output _ease and target along with the error, and they were both null.

i added a variable called _targetName and in the constructor it changes to the name of the target it it has a name, or to "unnamed" if it doens't

when it threw the error in renderTime, _targetName was null

 

can you think of anything that would cause this?

 

thanks

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...