Reputation: 520
I would like to do logic like:
local function create(...)
for k, v in ipairs{...} do
if k == "player" then
_player = v
end
end
if _player == nil then
**error**("It nil") -- stop running here and throw the error
end
end
Does Lua has anything like error function here?
Upvotes: 1
Views: 611