Posted By: Truth
Reading a TXT file on server - 04/26/20 16:39
Hi,
Is there a way to read a text file on a server into a STRING object? I need to be able to be able to change or add another "session_connect" ip address after I've released my game just by modifying a text file.
Currently I'm using a local text file
STRING Server = null;
var FileServerTxt;
function multiplayer
{
FileServerTxt = file_open_read("Server.txt"); <-------I thought I could just change this txt to the URL of the server but it doesn't work
file_str_read(FileServerTxt, Server);
session_connect("highroad", Server);
file_close(FileServerTxt);
}
thanks
Is there a way to read a text file on a server into a STRING object? I need to be able to be able to change or add another "session_connect" ip address after I've released my game just by modifying a text file.
Currently I'm using a local text file
STRING Server = null;
var FileServerTxt;
function multiplayer
{
FileServerTxt = file_open_read("Server.txt"); <-------I thought I could just change this txt to the URL of the server but it doesn't work
file_str_read(FileServerTxt, Server);
session_connect("highroad", Server);
file_close(FileServerTxt);
}
thanks