I am in the process of upgrading some old scripts, and one of the tips I’ve got is to make structs of my function collections. At the moment I have a struct patterned like this:
global SSR_gui struct SSR_gui ( function getControllers amount = ( -- A function that returns controllers in the scene based on amount string ), function clearKeys amount frameRange = ( -- This function calls getControllers, and clears keys in the returned controllers ), function offsetKeys amount frameRange = ( -- This function does the same, but offsets keys ) )
Functions two and three calls the first function for a list of objects, something that worked fine when these were just separate functions in my .ms file. But now that they are inside a struct, they both return “-- Runtime error: Struct member access requires instance: getControllers”
I have a ton of other functions - but only these two (so far) are giving me problems. Does anyone know what could be causing this?