base64_decode

Decode a base64 format string.

Syntax:

GML Code Example

base64_decode(string)


Argument Description
string The string to decode.


Returns: String


Description

This function will convert a string encoded previously using base64 format, into standard text. Base64 is a commonly used encoding scheme that is often used for any media that needs to be stored or transferred over the internet as text, and renders the output unreadable to the human eye.


Example:

GML Code Example

var str, file;
 str = base64_encode(game_data);
 file = file_text_open_read("save.txt");
 str = file_text_read_string(file); level_data = base64_decode(str);
 file_text_close(file);
 

The above code will open a text file and read a string from it into the local variable "str". This string is then decoded and the result stored in the instance variable "level_data".





No Examples Submitted

Does this page need better examples? Be the first to Submit

No Edits Suggested

Is this page unclear or not descriptive enough? Suggest an edit to the page and with enough upvotes your changes will be made.

No Questions Have Been Ask

Do you have a question about this page? Ask it Here