One step closer to the asylum.
I have this statement declaring the multi dimensional array:
This multi dimensional array gets its value updated at the OnBegin() event:
With the print function extracted right from the verse documentation (which was wrong if I may point it, Columns looked for the index = length)
Up to this point, it all works as intented, printing in the log my ((0, 0),(0, 0)) matrix
I’m trying to keep track which players killed which players, so what I came up with was a 2D array, which the Column Index would represent the corresponding player Index , and it would store in its Rows the number of kills to each player.
Ex: When Player1 kills Player0 the matrix should change to:
{ 0, 1 },
{ 0, 0 }
I’m trying to change the matrix at some point, but it seems the matrix its getting deleted at some point (maybe after finishing the OnBegin() task?)
The next time I try to access one of its elements (To call the PrintAllinMatrix() function, I get no log (now erased else statements with prints, so I’d know its failing to call the .Length of the matrix)
I have never ever encountered this type of issue with any language I’ve coded in.
The next part may be a little irrelevant, but I’ll add it because maybe there is a more robust/failproof way of doing things.
I intended to use another PlayerArray which is set its value to GetPlaySpace().GetPlayers() on the OnBegin() function, to store all player references and access the players through its Index (and not having to call the GetPlayers() function everytime and look for the player. I expected players leaving the match would change the Index at with the GetPlayers() function stores the player in the array, messing with my other Matrix.
This array would also clear suddenly, making its elements unaccesible.
For now I am calling the GetPlayers() function, and trying to clear a bit of development before addressing the possible bugs it would cause.