From 55de9fc0fa5de3434ebfd602151ca362113453ed Mon Sep 17 00:00:00 2001 From: "Jonny_Bro (Nikita)" Date: Tue, 29 Aug 2023 17:36:57 +0500 Subject: [PATCH] cleaning --- beatrun/gamemodes/beatrun/gamemode/cl/OnlineCourse.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/beatrun/gamemodes/beatrun/gamemode/cl/OnlineCourse.lua b/beatrun/gamemodes/beatrun/gamemode/cl/OnlineCourse.lua index 4f15b8c..c0d3880 100644 --- a/beatrun/gamemodes/beatrun/gamemode/cl/OnlineCourse.lua +++ b/beatrun/gamemodes/beatrun/gamemode/cl/OnlineCourse.lua @@ -3,6 +3,7 @@ local domain = CreateClientConVar("Beatrun_Domain", "courses.beatrun.ru", true, function UploadCourse() if Course_Name == "" or Course_ID == "" then return print("Can't upload in Freeplay") end + local url = domain:GetString() .. "/upload.php" local data = file.Open("beatrun/courses/" .. game.GetMap() .. "/" .. Course_ID .. ".txt", "rb", "DATA") local filedata = util.Decompress(data:Read(data:Size())) @@ -72,6 +73,7 @@ end) function UpdateCourse(course_code) if Course_Name == "" or Course_ID == "" then return print("Can't upload in Freeplay") end + local url = domain:GetString() .. "/updatecourse.php" local data = file.Open("beatrun/courses/" .. game.GetMap() .. "/" .. Course_ID .. ".txt", "rb", "DATA") local filedata = util.Decompress(data:Read(data:Size())) @@ -81,15 +83,13 @@ function UpdateCourse(course_code) map = string.Replace(game.GetMap(), " ", "-"), course_data = util.Base64Encode(filedata, true), code = course_code - }, - function(body, length, headers, code) -- onSuccess function + }, function(body, length, headers, code) -- onSuccess function if code == 200 then print("Response: " .. body) else print("Error (" .. code .. "): " .. body) end - end, - function(message) -- onFailure function + end, function(message) -- onFailure function print("Unexpected error: " .. message) end) end