Thank you. I've already tried these. I don't mean runtime errors but compile errors.
SetErrorMode(1)
SetWindowTitle( "Error Catch" )
SetWindowSize( 1024, 768, 0 )
SetWindowAllowResize( 1 )
SetVirtualResolution( 1024, 768 )
SetOrientationAllowed( 1, 1, 1, 1 )
SetSyncRate( 30, 0 )
SetScissor( 0,0,0,0 )
UseNewDefaultFonts( 1 )
therewasanerror() //no such command, function, variable e.t.c.
local y as string
if GetErrorOccurred()
y = GetLastError()
if GetFileExists("error.txt") then DeleteFile("error.txt")
OpenToWrite(1, "error.txt")
WriteString(1, y)
closefile(1)
endif
do
Print( ScreenFPS() )
Sync()
loop
this results with;
main.agc:13: error: "therewasanerror" is not a recognised function or command
I want to catch that if possible.