playMaker

Author Topic: Arrays fill themselves with empty spaces  (Read 2013 times)

Maxi

  • Playmaker Newbie
  • *
  • Posts: 41
Arrays fill themselves with empty spaces
« on: March 04, 2017, 09:15:47 AM »
Hi,

I have searched for that problem and was suprised that I couldnt seem to find anyone with the same issue:

I have some string-arrays which fill themselves up with empty spaces. I am not sure when, I guess while running the game, but when I resume editing, the arrays suddenly contain more and more empty items. That means that the size changes from 0 to 1,2,3 and so on, but without any content. This leads to wrong positionings of the text which I load into the array in runtime. Furthermore, sometimes Playmaker chrashes when I click on the variable in the variable tab (which doesnt happen at any other point).

I dont use ArrayMaker, maybe I should? But from the technical standpoint I could do anything I need with the normal array functions wouldn't it be for that bug (?).

I am using arrays more or less for the first time, but quite extensivly (looping through them over and over), maybe I use them wrong?

Thanks for help and suggestions!

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Arrays fill themselves with empty spaces
« Reply #1 on: March 06, 2017, 01:54:47 AM »
Hi,

 You likely have an action working on the array and you forgot about it and where it is. variables do not get edited unless there is an action or script working on it.

I would suggest you find the real issue here instead of switching, this should not happen.

Maybe PlayMaker crashes because you have an infinite loop or something.

Let me know how it goes.

 Bye,

 Jean

 

Maxi

  • Playmaker Newbie
  • *
  • Posts: 41
Re: Arrays fill themselves with empty spaces
« Reply #2 on: March 06, 2017, 07:05:34 AM »
Hi Jean,

I have actions which work with the array (fill it, read through it, empty it, etc.), but that shouldn't change the array-size in the editor, should it? The sizes are changed when not running the game, the same goes for the chrashes. I defined the variable to have a 0 size, but sometimes it has 1, 2,3 etc. When I use the variable in a state, the debug-window then says:  , , , , as value for the array.

Or am I misunderstanding something?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Arrays fill themselves with empty spaces
« Reply #3 on: March 09, 2017, 01:06:09 AM »
Hi,

 when you hit stop, all variables including array should be back to how it was before you hit play.

 IF that's not the case, can you make a screencast showing it? do you get any errors in Unity console or PlayMaker?

Bye,

 Jean

Maxi

  • Playmaker Newbie
  • *
  • Posts: 41
Re: Arrays fill themselves with empty spaces
« Reply #4 on: April 21, 2017, 08:39:10 AM »
Hi,

I encountered the problem again. When I use Array Add Range the error happens which i have attached. When I hit the Variables Tab after that, Playmaker chrashes and when I restart Unity the Array Variable (in this case List/ Scenes), which I created with a size of 0 now has a random size, usually between 1 and 3.

It is a different project than my initial problem, with an updated Version of Unity.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Arrays fill themselves with empty spaces
« Reply #5 on: April 26, 2017, 03:41:22 AM »
Hi,

 The question would be what is it that you tried to add. So I would look in the action that add these null value and check what are these values.

so I know the type of variable you want to add, I can certainly try to prevent crashes to occurs for sure.

 Bye,

 Jean