file_bin_read_byte

Reads a byte of data from a binary file.

Syntax:

file_bin_read_byte(binfile);


Argument Description
binfile The ID of the file to get the data from.


Returns: Real


Description

This function will return a byte of data from current position within the file with the given file ID. You supply the file ID value, as returned by the function file_bin_open.

NOTE: These functions do not work when the target module is HTML5.


Example:

file = file_bin_open('myfile.bin', 2);
data = file_bin_read_byte(file);
file_bin_close(file);

This would open a file from the same directory as the game, and get a byte of data from it before closing it again.


Back: Binary Files
Next: file_bin_open
© Copyright YoYo Games Ltd. 2018 All Rights Reserved