- Joined
- Aug 7, 2013
- Messages
- 1,338
Hi,
I did a basic implementation of a 2-D array, e.g. [i * j + offset], but I realized this doesn't work if the 2-D array is in a struct, because what is happening is newer structs are overwriting the values of the previously instantiated structs as they don't really have their own separate array unfortunately.
I need 2-d array because in the struct, there is an array of dialogs, and I have to keep track of each dialog's set of buttons, and each dialog's button's message like so
button array[dialogNumber][bttnNumber]
string array[dialogNumber][bttnNumberMessage]
What would be a quick fix for this ... ?
I did a basic implementation of a 2-D array, e.g. [i * j + offset], but I realized this doesn't work if the 2-D array is in a struct, because what is happening is newer structs are overwriting the values of the previously instantiated structs as they don't really have their own separate array unfortunately.
I need 2-d array because in the struct, there is an array of dialogs, and I have to keep track of each dialog's set of buttons, and each dialog's button's message like so
button array[dialogNumber][bttnNumber]
string array[dialogNumber][bttnNumberMessage]
What would be a quick fix for this ... ?