playMaker

Author Topic: Arraymaker error  (Read 2807 times)

Satrio

  • Junior Playmaker
  • **
  • Posts: 67
Arraymaker error
« on: August 29, 2013, 06:41:38 AM »
I don´t know if this error screws up my project or not, but a red error exclamation mark can´t be good, can it?

ArgumentOutOfRangeException: Argument is out of range.
Parameter name: index
System.Collections.Generic.List`1[UnityEngine.GameObject].get_Item (Int32 index) (at /Applications/buildAgent/work/b59ae78cff80e584/mcs/class/corlib/System.Collections.Generic/List.cs:633)
PlayMakerHashTableProxy.PreFillHashTable () (at Assets/PlayMaker ArrayMaker/__internal__/PlayMakerHashTableProxy.cs:124)
PlayMakerHashTableProxy.Awake () (at Assets/PlayMaker ArrayMaker/__internal__/PlayMakerHashTableProxy.cs:96)


I have a Hashtable that I prefilled with keys and prefab gameobjects. I get the keys from an SQLite Kit Database and "create" prefabs. Usually works good, but I am having some problems with SQLiteAsync, database not ready.. I am not sure if the two are related, but they both turned up at the same time, now I get this error everytime i run my game..


I will try Orangetree aswell for some answers, but usually their replies are really hard to understand (language barrier).


I have Arraymaker 0.92.


Another suggestion would be to write the current version number of Arraymaker on the wiki. It is hard to know which version is up there.. or maybe I'm blind and just cant find the info?


Thanks!


/s

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Arraymaker error
« Reply #1 on: September 10, 2013, 03:02:22 AM »
Hi,

 arrayMaker version will not change this problem. You simply have to wait for the database to give you the result back before injecting in ArrayMaker ( or anything else for that matter I think).

 If you have a repro project, let me know, I can look at this and provide the right process.

 Bye,

 Jean

Satrio

  • Junior Playmaker
  • **
  • Posts: 67
Re: Arraymaker error
« Reply #2 on: September 12, 2013, 04:12:01 AM »


Hi! This is my setup, Im not sure I can create a reproduction of this "mess".

I use a Sqlite kit database from a google docs document. Everytime I generate a new level, the database gets copied and opened and closed. I tried separating the copy and open and close thing from my main loop, but i still havent gotten it to work properly.. it works a few times though before it hangs, so I was fooled into thinking "I got this" :(

Also the error
"ArgumentOutOfRangeException: Argument is out of range.
Parameter name: index
System.Collections.Generic.List`1[UnityEngine.GameObject].get_Item (Int32 index) (at /Applications/buildAgent/work/c514da0c8183631c/mcs/class/corlib/System.Collections.Generic/List.cs:633)
PlayMakerHashTableProxy.PreFillHashTable () (at Assets/PlayMaker ArrayMaker/__internal__/PlayMakerHashTableProxy.cs:124)
PlayMakerHashTableProxy.Awake () (at Assets/PlayMaker ArrayMaker/__internal__/PlayMakerHashTableProxy.cs:96)"
shows itself even before the game does anything with the database.

This is how the hashtable looks..

Satrio

  • Junior Playmaker
  • **
  • Posts: 67
Re: Arraymaker error
« Reply #3 on: September 12, 2013, 08:14:49 AM »
I think I solved the database problems. I had a mismatch in my rows, where I should have 16 rows, but actually had 18. Also I separated the copy open and close database commands so I have better control over when to do what.
Also I inserted a new variable to make sure the data is read in sequence (but I dont think that is needed.

My new flow looks like this


I still get the "argument out of range" error, but the database gets read like it should!

Also I highlited the build sql command. Maybe someone can benefit from that.

/s

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Arraymaker error
« Reply #4 on: September 13, 2013, 03:08:34 AM »
Hi,

 It's going to be tricky to debug without having the project to test with. Can you pm me?

bye,

 Jean