(BUG) Call function from JS with deprecated object Function, always return 0

0 favourites
  • 3 posts
From the Asset Store
This Girls Game allows young fashionistas to develop their taste and skills as a fashion designer.
  • Hello.

    I have project from assets store and this project using deprecated object Function

    When i trying to call new type of function from JS, Construct always return 0

    c3_callFunction()/c2_callFunction()

    If i delete this old object from project, then everything is working fine

    But if i create function with deprecated object.

    I can call this function with c3_callFunction(), and it run perfectly

    Can you fix this? And we will posibility use new type of function from JS

    Thank you

  • When you have both the legacy Function object and the newer function blocks in the same project, it's not clear which kind of function should be invoked by c3_callFunction (note c2_callFunction is just another name for the same function). IIRC, the legacy Function object "wins" and gets invoked, for backwards compatibility purposes. As there's no way for that function to specify which type of function to invoke, it's not possible to specify that it should invoke a function block instead.

    The legacy Function object is deprecated and will no longer be supported, so your best option is to remove it and replace it with built-in functions.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • When you have both the legacy Function object and the newer function blocks in the same project, it's not clear which kind of function should be invoked by c3_callFunction (note c2_callFunction is just another name for the same function). IIRC, the legacy Function object "wins" and gets invoked, for backwards compatibility purposes. As there's no way for that function to specify which type of function to invoke, it's not possible to specify that it should invoke a function block instead.

    The legacy Function object is deprecated and will no longer be supported, so your best option is to remove it and replace it with built-in functions.

    Ok, thank you!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)