Add tasks for all the new languages

This commit is contained in:
Tina Müller 2016-12-05 23:44:36 +01:00
parent 9dc3c2bb62
commit bba7bfd280
13208 changed files with 134745 additions and 0 deletions

View file

@ -0,0 +1,19 @@
-- parent script "ErrorHandler"
on alertHook (me, errorType, errorMessage, alertType)
if alertType=#alert then return 0 -- ignore programmatic alerts
-- log error in file "error.log"
fn = _movie.path&"error.log"
fp = xtra("fileIO").new()
fp.openFile(fn, 2)
if fp.status() = -37 then
fp.createFile(fn)
fp.openFile(fn, 2)
end if
fp.setPosition(fp.getLength())
fp.writeString(_system.date() && _system.time() && errorType & ": " & errorMessage & RETURN)
fp.closeFile()
return 1 -- continues movie playback, no error dialog
end

View file

@ -0,0 +1,4 @@
-- in a movie script
on prepareMovie
_player.alertHook = script("ErrorHandler")
end

View file

@ -0,0 +1,6 @@
-- in a movie script
-- usage: throw("Custom error 23")
on throw (msg)
_player.alertHook.alertHook("Script runtime error", msg, #script)
abort() -- exits call stack
end