Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: pustur on April 11, 2012, 01:09:19 PM

Title: [SOLVED] Arraymaker Failure event does not work?
Post by: pustur on April 11, 2012, 01:09:19 PM
i have a problem and i don't know if i'm doing something wrong or i found a "bug" in playmaker/arraymaker?

http://i1264.photobucket.com/albums/jj493/pstrnil/Schermata2012-04-11a185341.png

as you can see in the image i get an error:
"Index is less than 0 or more then or equal to the list count"
this is normal in some cases, and if index isn't an appropriate value, then the Array List Get failure event should be activated. Am i right? Well, that's not happening, i get stuck on that node  :-\

thanks for reading!
Title: Re: Arraymaker Failure event does not work?
Post by: jeanfabre on April 12, 2012, 07:11:50 AM
Hi,

 Yes you are right, it's likely a bug, will catch it and send an update.( not today tho, likely tomorow).

 Thanks for spotting this.

 Bye,

 Jean
Title: Re: Arraymaker Failure event does not work?
Post by: jeanfabre on April 13, 2012, 01:28:09 AM
Hi,

 ok, completely overlooked this failure event management, so thanks for this :)

 You can find the corrected script attached, simply put it in

Playmaker/Actions/Addons/ArrayMaker/ArrayList/

and the fail event will be properly handled and you should not get any errors using out of bounds indexes.

I am not going to make an update on the wiki as I am revamping the structure of ArrayMaker ( to make it outside the playmaker folder, which will be a lot easier and less invasive), but the next package version will of course include this fix.


 Bye,

 Jean
Title: Re: Arraymaker Failure event does not work?
Post by: pustur on April 13, 2012, 11:50:24 AM
At the beginning i was confused, then i saw the downloadable file  ;)
thank you very much!
Title: Re: [SOLVED] Arraymaker Failure event does not work?
Post by: jeanfabre on April 14, 2012, 08:21:52 AM
Hi,

 Sorry, bad english, I should have phrased it differently.

Bye,

 Jean
Title: Re: [SOLVED] Arraymaker Failure event does not work?
Post by: silversteez on September 30, 2012, 07:58:00 PM
hello,

sorry to dig up this thread, but i'm a new arraymaker (and playmaker) user and i'm still having this problem. i downloaded the updated ArrayListGet.cs and replaced the old version, but i'm still getting an error (Index is less than 0 or more then or equal to the list count).

if i search an array for an entry at index 9, but the array only has 8 entries, this should trigger the failure event, correct?

i'm not sure why it's not working for me - it must have worked for the original poster...

thanks,
matt

Title: Re: [SOLVED] Arraymaker Failure event does not work?
Post by: jeanfabre on October 01, 2012, 01:00:53 AM
Hi,

 ok, I see you don't want to log the error. The failure event is properly triggered on the version in this thread, but it nonetheless will log an error in the console.

I have attached a version that doesn't log the error.

bye,

 Jean
Title: Re: Arraymaker Failure event does not work?
Post by: bobbykarate on May 23, 2013, 04:47:15 PM
Hi. Old thread but maybe relevant to my issue. I'm new to playmaker, arraylists, and scripting and everything but working hard to learn. I have this issue...

I'm crudely trying to learn to setup an item manager for a sort of point and click adventure type game. So I hover over an object and text changes based on what object I'm hovering over. the manager gets a string from the arraylist proxy component on the object being hovered over. This works but...

when I hover over an object with no arraylist proxy component, the game crashes rather than sending the failure event.

What am I missing? I assumed the failure event would fire then rather than getting this error...
Title: Re: [SOLVED] Arraymaker Failure event does not work?
Post by: bobbykarate on May 23, 2013, 06:00:45 PM
so the problem seems to be when I move from hovering over an object then into empty space, the failure event fires off as expected. But when I move from an object with an arraylist component to another object without an arraylist proxy component, it crashes complaining about not being able to find the component.

But I don't want every object to require an arraylist for this to work, only some objects. For example, I don't want my terrain to do anything when hovered over, but when I hover over a specified object, I want it to then tell my item manager to choose the proper string defined by the object being hovered over and use it on a specified label.

Any direction on this would mean leaps and bounds for me.
Title: Re: [SOLVED] Arraymaker Failure event does not work?
Post by: bobbykarate on May 23, 2013, 07:22:44 PM
I think I solved the problem by having the hoverable items tell the manager they are being hovered over, rather than having the manager ask whats being hovered over. These tools are really empowering! :) can't wait to share what I'm working on:)
Title: Re: [SOLVED] Arraymaker Failure event does not work?
Post by: jeanfabre on May 24, 2013, 01:48:51 AM
Hi,

 there is a work in progress section on this forum, don't hesitate!

bye,

 Jean