17,101
edits
(Implement getSlayerTierMonsterTable; Improve performance of getMonster, getSpecialAttack, getPassive) |
m (getSlayerTierMonsterTable: Adjust input validation) |
||
Line 893: | Line 893: | ||
if tier == nil then | if tier == nil then | ||
return "ERROR: No tier specified" | return "ERROR: No tier specified" | ||
elseif | elseif tonumber(tier) == nil then | ||
return "ERROR: Tier must be an integer" | return "ERROR: Tier must be an integer" | ||
else | else | ||
tier = math.floor(tier) | tier = math.floor(tonumber(tier)) | ||
local tierCount = Shared.tableCount(SlayerTiers) - 1 | local tierCount = Shared.tableCount(SlayerTiers) - 1 | ||
if tier < 0 or tier > tierCount then | if tier < 0 or tier > tierCount then |