lovr.event.quit

Pushes an event to quit or restart the application. An optional number can be passed to set the exit code for the application. An exit code of zero indicates normal termination, whereas a nonzero exit code indicates that an error occurred.

lovr.event.quit(code)

Arguments

NameTypeDefaultDescription
codenumber0The exit code of the program.

Returns

Nothing


lovr.event.quit('restart')

Arguments

NameTypeDescription
'restart'stringRestart instead of quitting.

Returns

Nothing

Notes

This function is equivalent to calling lovr.event.push('quit', <args>).

The program won't actually exit until the next time lovr.event.poll is called.

See also