code of script

if (hppc <= 90)
then
screenshot(name.." died at level "..level)
wait(1000, 1500)
end

and in debug window appears

19:05 : CaveBot:Manager:TakeSS - System.Runtime.InteropServices.ExternalException (0x80004005): A generic error occurred in GDI+.
at System.Drawing.Image.Save(String filename, ImageCodecInfo encoder, EncoderParameters encoderParams)
at System.Drawing.Image.Save(String filename, ImageFormat format)
at ..(String name)