LDinos
Member
Greetings! I am trying to make a simple auto update checker, and I thought of doing it like this: Download a text file that I have uploaded, read the string inside it, and compare it to the current version string. However I have a problem using http_get_file. Here's the object
Create event:
The link is a direct download
HTTP event:
What happens: Status returns -1 and full_status returns 200! The file is not even downloaded
What am I doing wrong?
Using GMS 2.2.4.474
Create event:
Code:
file = http_get_file("https://drive.google.com/uc?export=download&id=18TOKTHNzruc92BoK6YGOiQy1rLEqhSAi", working_directory)
HTTP event:
Code:
if ds_map_find_value(async_load, "id") == file
{
var status = ds_map_find_value(async_load, "status");
var full_status = ds_map_find_value(async_load,"http_status");
if status == 0
{
var path = ds_map_find_value(async_load, "result");
var txt = file_text_open_read(path)
var ver = file_text_read_string(txt)
show_message(ver + " - " + global.version)
file_text_close(txt)
}
else {str = full_status} //show me the error if status = -1
}
What am I doing wrong?
Using GMS 2.2.4.474