mirror of
https://github.com/ineedbots/iw4_bot_warfare.git
synced 2025-04-22 05:55:42 +00:00
write file
This commit is contained in:
parent
a7cd272b90
commit
ca0131f03d
@ -37,9 +37,10 @@ doVersionCheck()
|
||||
getRemoteWaypoints(mapname)
|
||||
{
|
||||
url = "https://raw.githubusercontent.com/ineedbots/iw4x_waypoints/master/" + mapname + "_wp.csv";
|
||||
filename = "waypoints/" + mapname + "_wp.csv";
|
||||
|
||||
println("Attempting to get remote waypoints from " + url);
|
||||
res = getLinesFromUrl(url);
|
||||
res = getLinesFromUrl(url, filename);
|
||||
|
||||
if (!res.lines.size)
|
||||
return;
|
||||
@ -86,7 +87,7 @@ getRemoteVersion()
|
||||
/*
|
||||
Returns an array of each line from the response of the http url request
|
||||
*/
|
||||
getLinesFromUrl(url)
|
||||
getLinesFromUrl(url, filename)
|
||||
{
|
||||
result = spawnStruct();
|
||||
result.lines = [];
|
||||
@ -101,6 +102,8 @@ getLinesFromUrl(url)
|
||||
if (!success)
|
||||
return result;
|
||||
|
||||
fileWrite(filename, data, "write");
|
||||
|
||||
line = "";
|
||||
for (i=0;i<data.size;i++)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user