errno [function]

errno( as_string = false )

returns the last relevant error number for the C standard library, as an integer or a string if as_string is set

data = io_file_read( "doesnotexist" ); // file that does not exist
print errno(); // prints 2
print errno(true); // prints "No such file or directory" on Windows