iamzip Posted November 14, 2020 Posted November 14, 2020 So I'm trying to use json in my scripts and I have a question about arrays. I've searched the api and around the web and I can't find a direct answer. I'm building lists in a json file then later filling papyrus arrays with them. My question is, if the list doesn't exist in json, for whatever reason, what does the listtoarray function return? Do I need to check before passing, ie: Spoiler If(jsonutil.intlistcount("filename", "listname") > 0) Array = intlisttoarray("filename", "listname") EndIf Or if it doesn't exist and it doesn't pass anything, I'm assuming I'd have to fill the array another way, ie: Spoiler Array = IntListToArray("filename", "listname") If(!array) Array = createintarray(1, -1) EndIf Or does it already pass a size 1 array of -1?
Recommended Posts
Archived
This topic is now archived and is closed to further replies.