11 lines
164 B
Text
11 lines
164 B
Text
|
|
local function divide(a, b)
|
||
|
|
return a // b
|
||
|
|
end
|
||
|
|
|
||
|
|
local ok, res = pcall(divide, 1, 0)
|
||
|
|
if ok then
|
||
|
|
print(res)
|
||
|
|
else
|
||
|
|
print("Attempted to divide by zero.")
|
||
|
|
end
|