• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Windows How to save a message into an TXT file using get_save_filename_ext?

L

L95

Guest
Hi everyone!

Look, i got this issue, and i tried to see what's going on, but I can't figure out what's wrong, I would put the code here but I don't want to confuse anyone. (I'll provide you a simple example)

The thing is, I want the game pops-up a window (with this function: "get_save_filename_ext") and let the user save a message (message that is included in a global variable [See the code below...])

Imagine that I have 1 object
obj_CONTROL -> Create Event -> global.MESSAGE = "hi123";

Now imagine that I have button
obj_BUTTON -> Step event ->
if (mouse_check_button_released(mb_left))
{
if instance_position(mouse_x, mouse_y, obj_BUTTON)
{
///Window pops up letting the user save this message into a file...
}
}


How would you do this?
I would appreciate if someone can help me with this.
I tried using the functions from the documentation:
https://docs.yoyogames.com/source/dadiospice/002_reference/file handling/files/index.html

But all I got it's just errors.

Thank you!

- L95
 
Top