Home › Forums › Monkey 2 Programming Help › How to resize multidimensional arrays?
This topic contains 2 replies, has 2 voices, and was last updated by Henry1975 2 months, 1 week ago.
I’m standing a little bit on my line right now trying to resize a multidimensional array.
Local testString1:String = New String
testString1 = testString1.Resize(2)
This throws errors in any Resize() combination I tried:
Local testString2:String[,] = New String[1,2]
testString2 = testString2.Resize(2,2)
Anyone able to give me the solution?
Two dimensional arrays cannot currently be resized. You need to roll your own function to do so. Here is an example function that works.
Many thanks Tom, I gonna implement this function in my code!
You must be logged in to reply to this topic.