For some reason, my ranking function doesn’t choose the correct rank, and it seems to be permanently stuck on:
Professional
Is there something wrong with my implementation? Or logic? I don’t know.
Help much appreciated:
Ranking Functions
local function ReturnRank()
for index, value in pairs(RankModule) do
if tonumber(index) <= Level.Value then
Rank = value
end
end
end
Module
local RankModule = {
["1"] = "Newbie",
["2"] = "Progressive",
["3"] = "Ok-ish",
["5"] = "Intermediate",
["10"] = "Professional",
["15"] = "Bronze Master",
["20"] = "Silver Master",
["30"] = "Gold Master",
["40"] = "Diamond Master",
["50"] = "Talented",
["100"] = "Boundary Breaker",
["500"] = "Sweat",
["1000"] = "Impossible",
}
return RankModule
Thanks again!