Swe-DivX Posted April 19, 2021 Posted April 19, 2021 Im trying to split test0, i cant find any example of this. string test0 = "" if btest1 test0 += ",test1" endif if btest2 test0 += ",test2" endif if btest3 test0 += ",test3" endif Test[0] = test0 Test[1] = test0 Test[2] = test0
AndrewLRG Posted April 19, 2021 Posted April 19, 2021 You want to split text0 into parts divided by commas? Something like: Text0 = "A, B, C" Text[0] = "A" Text[1] = "B" Text[2] = "C" ?
Swe-DivX Posted April 19, 2021 Author Posted April 19, 2021 32 minutes ago, AndrewLRG said: You want to split text0 into parts divided by commas? Something like: Text0 = "A, B, C" Text[0] = "A" Text[1] = "B" Text[2] = "C" ? Yes, it for dynamic menu
AndrewLRG Posted April 19, 2021 Posted April 19, 2021 It can be done with PapyrusUtil. --------------------- String Text = "AAA, BBB, CCC" String[] TextArray = PapyrusUtil.StringSplit(Text, ",") ------------------------- TextArray[0] will be AAA TextArray[1] - BBB TextArray[2] - CCC
Swe-DivX Posted April 19, 2021 Author Posted April 19, 2021 4 minutes ago, AndrewLRG said: It can be done with PapyrusUtil. --------------------- String Text = "AAA, BBB, CCC" String[] TextArray = PapyrusUtil.StringSplit(Text, ",") ------------------------- TextArray[0] will be AAA TextArray[1] - BBB TextArray[2] - CCC I will try it tomorrow
Swe-DivX Posted April 20, 2021 Author Posted April 20, 2021 On 4/19/2021 at 5:36 PM, AndrewLRG said: It can be done with PapyrusUtil. --------------------- String Text = "AAA, BBB, CCC" String[] TextArray = PapyrusUtil.StringSplit(Text, ",") ------------------------- TextArray[0] will be AAA TextArray[1] - BBB TextArray[2] - CCC It works, i can now add new menus and remove them if the external mod is disable
Recommended Posts
Archived
This topic is now archived and is closed to further replies.