Ignore an error?

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
louie999
Prole
Posts: 46
Joined: Fri Mar 06, 2015 9:01 am

Ignore an error?

Post by louie999 »

Is it possible to ignore an error? like when an error happens, the error screen won't come, like it will just continue normally. Is that possible?

Code: Select all

fun = true
school = true

function isItFun()
    if school then
       fun = false
    end
    if not fun then 
       me:explode()
    end
end
User avatar
Positive07
Party member
Posts: 1014
Joined: Sun Aug 12, 2012 4:34 pm
Location: Argentina

Re: Ignore an error?

Post by Positive07 »

you can use [manual]pcall[/manual] and [manual]xpcall[/manual] to catch errors yourself so that they dont propagate to LÖVE
for i, person in ipairs(everybody) do
[tab]if not person.obey then person:setObey(true) end
end
love.system.openURL(github.com/pablomayobre)
louie999
Prole
Posts: 46
Joined: Fri Mar 06, 2015 9:01 am

Re: Ignore an error?

Post by louie999 »

Ok thanks :D

Code: Select all

fun = true
school = true

function isItFun()
    if school then
       fun = false
    end
    if not fun then 
       me:explode()
    end
end
Post Reply

Who is online

Users browsing this forum: No registered users and 233 guests