How To: List/Array in Choicescript v4.1

You might want to take a look at this, I know it has an array function.

3 Likes

CS Lib has helper subroutines for working with arrays. It still requires you to instanciate all the variables.

Your solution reminded me of @Twiger_Fluff’s one, so you might want to check that one as well.

2 Likes

Unfortunately, as you say, even with CSLIB you’d need to define your “maximum” amount of variables. There is no such thing as dynamically growing arrays in ChoiceScript.

Both your solution and @Twiger_Fluff’s get around this by using strings as the storage medium.

I’m going to merge this thread into Twiger’s thread (as that solution came along first). It’s good to have another reference implementation though, thank you for sharing.

3 Likes