luaのpcalの使い方
try-catch みたいな感じ。
function ai() error("a") print(33) end local flag, ret = pcall( ai ) if not flag then print(44) end
try-catch みたいな感じ。
function ai() error("a") print(33) end local flag, ret = pcall( ai ) if not flag then print(44) end