Jump to content
RealModScene
Sign in to follow this  
DMNBT

Custom sort not showing up

Recommended Posts

Hello, I'm trying to create a custom sort for my games that puts games from the same series together. However, my custom sort is not showing up, presumably because it has errors in it, but I'm not sure where they are...any help is appreciated.

GameListSorters["Series"] = function(Item1, Item2, Type)
	series_list = {["ace combat 6: fires of liberation"] = "ace combat 6",["ace combat: assault horizon"] = "ace combat 7",["alan wake"] = "alan wake 1",["army of two"] = "army of two 1",["army of two: the 40th day"] = "army of two 2",["army of two: the devil's cartel"] = "army of two 3",["burnout paradise"] = "burnout 5",["burnout revenge"] = "burnout 4",["dead space"] = "dead space 1",["deathsmiles"] = "deathsmiles 1",["deathsmiles 2x"] = "deathsmiles 2",["devil may cry hd collection"] = "devil may cry 3",["dmc devil may cry"] = "devil may cry 5",["dodonpachi daioujou black label extra"] = "dodonpachi 3",["dodonpachi resurrection"] = "dodonpachi 4",["dodonpachi saidaioujou"] = "dodonpachi 5",["dragon ball z budokai hd collection"] = "dragon ball z budokai 3",["dragon ball z burst limit"] = "dragon ball z budokai 4",["final fantasy xiii"] = "final fantasy 13-1",["final fantasy xiii-2"] = "final fantasy 13-2",["forza horizon"] = "forza horizon 1",["forza horizon 2"] = "forza horizon 2-1",["forza horizon 2 presents fast & furious"] = "forza horizon 2-2",["gears of war"] = "gears of war 1",["gears of war: judgment"] = "gears of war 4",["lightning returns: final fantasy xiii"] = "final fantasy 13-3",["metal gear rising: revengeance"] = "metal gear solid 6",["metal gear solid hd collection"] = "metal gear solid 3",["metal gear solid v: ground zeroes"] = "metal gear solid 5-1",["metal gear solid v: the phantom pain"] = "metal gear solid 5-2",["metal gear solid: peace walker hd"] = "metal gear solid 4",["mushihime-sama"] = "mushihimesama 1",["mushihime-sama futari"] = "mushihimesama 2",["need for speed: prostreet"] = "need for speed 2007",["need for speed: the run"] = "need for speed 2011",["prince of persia"] = "prince of persia 7",["prince of persia: the forgotten sands"] = "prince of persia 8",["resident evil 0 hd remaster"] = "resident evil 0",["resident evil 4 hd"] = "resident evil 4",["resident evil code: veronica x hd"] = "resident evil 3",["resident evil hd remaster"] = "resident evil 1",["resident evil revelations"] = "resident evil revelations 1",["rise of the tomb raider"] = "tomb raider 2",["sherlock holmes vs. jack the ripper"] = "sherlock holmes 1",["sherlock holmes: crimes & punishments"] = "sherlock holmes 3",["silent hill 4: the room"] = "silent hill 4",["silent hill hd collection"] = "silent hill 3",["silent hill: downpour"] = "silent hill 6",["silent hill: homecoming"] = "silent hill 5",["soulcalibur iv"] = "soulcalibur 4",["soulcalibur v"] = "soulcalibur 5",["the evil within"] = "evil within",["the king of fighters xiii"] = "king of fighters 2013",["the testament of sherlock holmes"] = "sherlock holmes 2",["tom clancy's h.a.w.x."] = "tom clancy hawx 1",["tom clancy's h.a.w.x. 2"] = "tom clancy hawx 2",["tomb raider"] = "tomb raider 1",["ultimate marvel vs. capcom 3"] = "marvel vs capcom 3",["ultra street fighter iv"] = "street fighter 4",["alan wake's american nightmare"] = "alan wake 2",["banjo-kazooie"] = "banjo-kazooie 1",["banjo-tooie"] = "banjo kazooie 2",["marvel puzzle quest: dark reign"] = "puzzle quest 3",["puzzle quest: challenge of the warlords"] = "puzzle quest 1",["sonic & knuckles"] = "sonic the hedgehog 3-1",["sonic the hedgehog"] = "sonic the hedgehog 1",["sonic the hedgehog 3"] = "sonic the hedgehog 3-2",["sonic the hedgehog 4: episode i"] = "sonic the hedgehog 4-1",["sonic the hedgehog 4: episode ii"] = "sonic the hedgehog 4-2",["soulcalibur ii hd online"] = "soulcalibur 2",["street fighter iii: 3rd strike online edition"] = "street fighter 3",["super street fighter ii turbo hd remix"] = "street fighter 2",["the king of fighters '98 ultimate match"] = "king of fighters 1998",["the king of fighters 2002 unlimited match"] = "king of fighters 2002",["abaddon"] = "abaddon 1",["abaddon: retribution"] = "abaddon 2",["apple jack"] = "apple jack 1",["marvel vs. capcom: origins"] = "marvel vs capcom 1",["marvel vs. capcom 2"] = "marvel vs capcom 2"}
	gamen1l = string.lower(Item1.Name)
	gamen2l = string.lower(Item2.Name)
	gamen1n = series_list[gamen1l]
	gamen2n = series_list[gamen2l]
	if gamen1n != nil then
		gamen1l = gamen1n
	end
	if gamen2n != nil then
		gamen2l = gamen2n
	end
	if Type == SortType.Descending then
		return gamen1l > gamen2l
	end
	return gamen1l < gamen2l
end
  • Like 2

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...