Skip to content

Commit b8184c7

Browse files
1 parent 4bb043e commit b8184c7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/misc.lua

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,11 @@ function cry_pls(str, vars)
190190
table.insert(_table, v)
191191
end
192192
end
193-
local num = vars[tonumber(string.match(str, ">(%d+)"))] -- gets the number outside angle brackets, and its corresponding variable
193+
if not vars then
194+
num = 1 -- Hopefully prevents a crash if no level data
195+
else
196+
local num = vars[tonumber(string.match(str, ">(%d+)"))] -- gets the number outside angle brackets, and its corresponding variable
197+
end
194198
local plural = _table[1] -- default
195199
local checks = { [1] = "=" }
196200
if #_table > 1 then

0 commit comments

Comments
 (0)