You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Instead of displaying all buttons normally, the whole array is just shown as a name in 1 button.
For example, The Text of a single button becomes this:
At first I thought that Utility.CreateStringArray() was not supported, but then the example I gave in the second post didn't work either.
The text was updated successfully, but these errors were encountered:
I did a little testing and realized that the problem wasn't the Utility.CreateStringArray() arrays.
This default example code gives me the same strange result (as 1 button with array contents displayed):
string[] buttons = new string[2]
buttons[0] = "Ok"
buttons[1] = "Cancel"
int sel_btn = SkyMessage.Show("Hello, world!", buttons, getIndex = true) as int
Hmm...
Mirgosoft
changed the title
The Utility.CreateStringArray() as an array for button names is not supported.
An array of strings does not work properly as a parameter.
Nov 28, 2023
I think my regional settings have a comma rather than a dot separator (InvariantCulture problem).
I had a similar problem with the C# code here (First answer): stackoverflow link
I think it would be nice to fix this in the source code as well, or just use a simple Papyrus fix like this:
int function ShowSkyMessage_Fixed(string msg_text, string[] source_btns_arr) global
string[] btns = Utility.CreateStringArray(10, "") ; 10 buttons max with empty string values
int i = 0
while i < btns.Length && i < source_btns_arr.Length
btns[i] = source_btns_arr[i]
i += 1
endWhile
return SkyMessage.Show(msg_text, btns[0], btns[1], btns[2], btns[3], btns[4], btns[5], btns[6], btns[7], btns[8], btns[9], getIndex = true) as int
endFunction
Instead of displaying all buttons normally, the whole array is just shown as a name in 1 button.
For example, The Text of a single button becomes this:
At first I thought that Utility.CreateStringArray() was not supported, but then the example I gave in the second post didn't work either.
The text was updated successfully, but these errors were encountered: