Search
 
SCRIPT & CODE EXAMPLE
 

LUA

lua catch error

-- The pcall (f, arg1, ...) function calls the requested function in
-- protected mode. If some error occurs in function f, it does not throw
-- an error. It just returns the status of error. A simple example using
-- pcall is shown below.

Live Demo
function myfunction ()
   n = n/nil
end

if pcall(myfunction) then
   print("Success")
else
	print("Failure")
end
Comment

PREVIOUS NEXT
Code Example
Lua :: gfjhhkn roblox 
Lua :: how do you find a humanoid in roblox 
Lua :: forever loop in lua 
Lua :: color3 not working lua 
Lua :: how to exit current scope roblox 
Lua :: loop true childs roblox 
Lua :: lua check if string is number 
Lua :: how to make a color changing brick in roblox studio 
Lua :: print script lua 
Lua :: roblox number between 1 and 10 
Lua :: lua indexof 
Lua :: roblox how to detect human touchinhg 
Lua :: lua function 
Lua :: how do i do a wait lin lua replit 
Lua :: draw circle love2d 
Lua :: Lua how to get the index of a nested table 
Lua :: lua roblox hack scripts 
Lua :: how to check if table is clear 
Lua :: lua wiki 
Matlab :: log base 10 matlab 
Matlab :: matlab make last value the first one etc 
Matlab :: matlab app designer axes buttondownfcn 
Basic :: split to arraylist vb.net 
Elixir :: elixir defguard 
Elixir :: elixir check memory usage 
Scala :: print hello world in scala 
Scala :: how to print message in scala 
Excel :: google sheets convert string to date 
Perl :: perl post condition 
Pascal :: pascal input 
ADD CONTENT
Topic
Content
Source link
Name
3+8 =