Merge pull request #555 from argonui/import-instructions
Added nil handling for import instructions
This commit is contained in:
commit
107ca76148
@ -323,6 +323,7 @@ do
|
||||
if instructor == "add:" then
|
||||
slots[str] = (slots[str] or 0) + 1
|
||||
elseif instructor == "remove:" then
|
||||
if slots[str] == nil then break end
|
||||
slots[str] = math.max(slots[str] - 1, 0)
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user