From a1cd4c345f42aec402a7da6c68f32b5f1cdd762d Mon Sep 17 00:00:00 2001 From: "Jonny_Bro (Nikita)" Date: Wed, 31 May 2023 19:59:13 +0500 Subject: [PATCH] Rename file to data --- beatrun/gamemodes/beatrun/gamemode/cl/OnlineCourse.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/beatrun/gamemodes/beatrun/gamemode/cl/OnlineCourse.lua b/beatrun/gamemodes/beatrun/gamemode/cl/OnlineCourse.lua index b0f9416..ee36fdf 100644 --- a/beatrun/gamemodes/beatrun/gamemode/cl/OnlineCourse.lua +++ b/beatrun/gamemodes/beatrun/gamemode/cl/OnlineCourse.lua @@ -4,8 +4,8 @@ local domain = CreateClientConVar("Beatrun_Domain", "localhost", true, false, "O function UploadCourse() if Course_Name == "" or Course_ID == "" then return print("Can't upload in Freeplay") end - local file = file.Open("beatrun/courses/" .. game.GetMap() .. "/" .. Course_ID .. ".txt", "rb", "DATA") - local filedata = util.Decompress(file:Read(file:Size())) + local data = file.Open("beatrun/courses/" .. game.GetMap() .. "/" .. Course_ID .. ".txt", "rb", "DATA") + local filedata = util.Decompress(data:Read(data:Size())) local function h_success(code, body, headers) print("Response: " .. code)