Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

SetCustomSortFunction not providing parameters?

Asked by 7 years ago
Edited 7 years ago

Hello ScriptingHelpers community, I've tried to use SetCustomSortFunction (a function which is within UIGridLayout) for the first time, but it's not working. Usually, the function will have one parameter, which will be the function. There should be two parameters, being the previous and next gui object which it'll sort. However, it provides no parameters. Am I using this incorrectly or is it simply broken? Here's my code.

SetCustomSortFunction(print)

(outputs nothing except for this error which is most likely because print returns nothing http://i.imgur.com/MSiBZLj.png), or even

SetCustomSortFunction(function(x,y) return tonumber(x.Name)>tonumber(y.Name) end)

(outputs nothing, which it shouldn't, but the error persists). and of course using this function after to apply the layout

ApplyLayout()

Does anyone know why this wont work?

Thanks for any help.

0
Yes, it is NewVoids 97 — 7y
0
Try this note, not sure if this is your problem... "Your sort function may be called with the same object as both arguments or two objects which you wish to consider equal. In this case, it should return false." M39a9am3R 3210 — 7y

Answer this question