Closed ELadner closed 4 years ago
You need to call NWNX_Data_Array_Resize()
first. It doesn't automatically resize the array.
The following works:
NWNX_Data_Array_Resize(NWNX_DATA_TYPE_STRING, OBJECT_INVALID, "test", 3);
NWNX_Data_Array_Insert_Str(OBJECT_INVALID, "test", 0, "ALCHEMY");
NWNX_Data_Array_Insert_Str(OBJECT_INVALID, "test", 1, "ATHLETICS");
NWNX_Data_Array_Insert_Str(OBJECT_INVALID, "test", 2, "ENCHANTING");
Thank you, Daz!
Could that insert be made to automatically resize?
PushBack doesn't require manual sizing...
Fixed in 64bit branch. Closing.
This seems like it should work, but causes the server to crash (on the very first line).
It seems like "Insert" expects there to be existing elements around where it's inserting, otherwise, it crashes.