[solved] Trying to diagnose plugin minify error

0 favourites
  • 1 posts
From the Asset Store
Use this game pack to create your own game, modify the existing game or simply take a look and see how it was made.
  • I am making a behavior plugin. All works well when the export is un-minified. If I minify the export then I receive the following error:

    TypeError: q is not a constructor[/code:37gsw7j8]
    
    The "q" corresponds to "behavior_ctor" in the c2runtime.js when un-minified:
    
    [code:37gsw7j8]Line 4420ish
    if (!behavior_plugin)
    				{ 
    					behavior_plugin = new behavior_ctor(this);
    					behavior_plugin.my_types = [];						// types using this behavior
    					behavior_plugin.my_instances = new cr.ObjectSet(); 	// instances of this behavior
    					if (behavior_plugin.onCreate)
    						behavior_plugin.onCreate();
    etc[/code:37gsw7j8]
    
    I hope that this is enough info.  If anyone has any idea where I should focus my efforts then that would be very much appreciated.  I imagine that I am missing something obvious here...  I am about to embark on a long process of rebuilding my plugin from scratch to see what causes the export to break.  But I need to sleep!   
    
    Edit:
    
    Solved.  Apparently you cannot preserve the name of your plugin like this: ["myplugin"].
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)