[SOLVED] Function 'moveToLayer' requires arguments : layerRefType, layerRef

Almakos

  • Posts: 632
After upgrading to latest version had to update game to 3.2 format and got lots of:
Code: [Select]
Not enough arguments
Function 'moveToLayer' requires arguments : layerRefType, layerRef
and
Code: [Select]
For function argument 'img'
nme.display.Bitmap should be com.stencyl.graphics.BitmapWrapper
flash.display.Bitmap should be com.stencyl.graphics.BitmapWrapper

after closing errors window one more popped-up:
Code: [Select]
Unexpected problem on thread AWT-EventQueue-0: java.lang.ArrayIndexOutOfBoundsException: 0 >= 0
java.lang.RuntimeException: java.lang.ArrayIndexOutOfBoundsException: 0 >= 0
at stencyl.sw.app.tasks.StencylWorker.done(StencylWorker.java:72)
at stencyl.sw.app.tasks.StencylWorker.done(StencylWorker.java:53)
at stencyl.sw.app.tasks.OpenResourceTask.done(OpenResourceTask.java:77)
at javax.swing.SwingWorker$5.run(SwingWorker.java:717)
at javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.run(SwingWorker.java:814)
at sun.swing.AccumulativeRunnable.run(AccumulativeRunnable.java:95)
at javax.swing.SwingWorker$DoSubmitAccumulativeRunnable.actionPerformed(SwingWorker.java:824)
at javax.swing.Timer.fireActionPerformed(Timer.java:291)
at javax.swing.Timer$DoPostEvent.run(Timer.java:221)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:715)
at java.awt.EventQueue.access$400(EventQueue.java:82)
at java.awt.EventQueue$2.run(EventQueue.java:676)
at java.awt.EventQueue$2.run(EventQueue.java:674)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:86)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:685)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 0 >= 0
at java.util.Vector.elementAt(Vector.java:427)
at javax.swing.DefaultComboBoxModel.getElementAt(DefaultComboBoxModel.java:105)
at stencyl.sw.editors.snippet.designer.dropdown.DropdownData.initList(DropdownData.java:89)
at stencyl.sw.editors.snippet.designer.Definition.initDropdowns(Definition.java:304)
at stencyl.sw.editors.snippet.designer.Definitions.createSetGameVariableBlock(Definitions.java:3420)
at stencyl.sw.editors.snippet.designer.SnippetDesigner.createGameVarSetter(SnippetDesigner.java:1465)
at stencyl.sw.editors.snippet.designer.SnippetDesigner.resetGameAttributes(SnippetDesigner.java:892)
at stencyl.sw.editors.snippet.designer.SnippetDesigner.<init>(SnippetDesigner.java:315)
at stencyl.sw.editors.snippet.SnippetDesignTab.<init>(SnippetDesignTab.java:91)
at stencyl.sw.app.doc.Workspace.fetchEditorForResource(Workspace.java:601)
at stencyl.sw.app.doc.Workspace.finishOpenResource(Workspace.java:437)
at stencyl.sw.app.tasks.OpenResourceTask.doInBackground(OpenResourceTask.java:68)
at stencyl.sw.app.tasks.OpenResourceTask.doInBackground(OpenResourceTask.java:20)
at javax.swing.SwingWorker$1.call(SwingWorker.java:277)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at javax.swing.SwingWorker.run(SwingWorker.java:316)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
at java.lang.Thread.run(Thread.java:695)


as discussed here:
http://community.stencyl.com/index.php/topic,34457.msg195269.html#msg195269
http://community.stencyl.com/index.php/topic,34455.0.html
it should be fixed by now...

Using Stencyl 3.1.0 (b7736)

« Last Edit: August 30, 2014, 06:50:54 pm by Almakos »
Fishing Fantasy Trailer


Justin

  • *
  • Posts: 4529
The issues in threads you linked to have both been resolved. I think the problem here may be that you still have some "old" code from previous versions. Try using the "Clean Project" command in the "Run" menu, see if that makes it work. If so, I can see about auto-cleaning the project when updating to 3.2.
For Live Support: Join our discord server and ping me @justin.
I'm most often available between 10am and 10pm Japan time. (GMT+9)

Almakos

  • Posts: 632
Hey Justin,
thanks for help.

After removing games generated folder, saving game and relaunching Stencyl it finally build successfully. Simple clean project didn't not work had to perform all of the above to get it fixed.

Thanks again.
Fishing Fantasy Trailer