From ee0ab60381af1130f924010379c761cf67a41d57 Mon Sep 17 00:00:00 2001 From: min Date: Tue, 9 Jun 2026 06:42:18 +0300 Subject: [PATCH] =?UTF-8?q?fix(lua-games):=20=D0=BA=D0=B8=D1=80=D0=B8?= =?UTF-8?q?=D0=BB=D0=BB=D0=B8=D1=87=D0=B5=D1=81=D0=BA=D0=B8=D0=B5=20=D0=B8?= =?UTF-8?q?=D0=BC=D0=B5=D0=BD=D0=B0=20leaderstats=20=D1=87=D0=B5=D1=80?= =?UTF-8?q?=D0=B5=D0=B7=20bracket=20access?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Lua не поддерживает кириллицу в именах identifier'ов (только в строках). stats.Монеты вызывал parser error: expected near '<\208>' (0xD0 = первый байт UTF-8 кириллицы) Заменено на безопасный синтаксис: stats.Монеты → stats['Монеты'] stats.Ключ → stats['Ключ'] stats.Клики → stats['Клики'] Затронуты игры: collect-coins (1), trader (13), key-chest (17), shop (29), clicker (46). Все 9 случаев исправлены. Теперь монетки в игре 1 должны нормально увеличивать счётчик. --- src/community/docsGamesBuildersLua.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/community/docsGamesBuildersLua.js b/src/community/docsGamesBuildersLua.js index 2d7e897..076bb9f 100644 --- a/src/community/docsGamesBuildersLua.js +++ b/src/community/docsGamesBuildersLua.js @@ -84,7 +84,7 @@ coinEvent.Event:Connect(function() for _, p in ipairs(Players:GetPlayers()) do local stats = p:FindFirstChild("leaderstats") if stats and stats:FindFirstChild("Монеты") then - stats.Монеты.Value = score + stats['Монеты'].Value = score end end print("Собрано: " .. score) @@ -445,11 +445,11 @@ part.Touched:Connect(function(hit) if not player then return end local stats = player:FindFirstChild("leaderstats") if not stats then return end - if stats.Монеты.Value >= 5 then - stats.Монеты.Value = stats.Монеты.Value - 5 + if stats['Монеты'].Value >= 5 then + stats['Монеты'].Value = stats['Монеты'].Value - 5 local h = hit.Parent:FindFirstChild("Humanoid") if h then h.Health = math.min(h.MaxHealth, h.Health + 50) end - print("Купил зелье! +50 HP. Осталось монет: " .. stats.Монеты.Value) + print("Купил зелье! +50 HP. Осталось монет: " .. stats['Монеты'].Value) else print("Не хватает монет! Нужно 5") end @@ -566,7 +566,7 @@ part.Touched:Connect(function(hit) if not player then return end local stats = player:FindFirstChild("leaderstats") if stats and stats:FindFirstChild("Ключ") then - stats.Ключ.Value = true + stats['Ключ'].Value = true print("Подобрал ключ!") part:Destroy() end @@ -578,7 +578,7 @@ part.Touched:Connect(function(hit) local player = Players:GetPlayerFromCharacter(hit.Parent) if not player then return end local stats = player:FindFirstChild("leaderstats") - if stats and stats.Ключ and stats.Ключ.Value then + if stats and stats['Ключ'] and stats['Ключ'].Value then print("Сундук открыт! ПОБЕДА!") part.Color = Color3.fromRGB(255, 215, 0) else @@ -900,8 +900,8 @@ part.Touched:Connect(function(hit) if not player then return end local stats = player:FindFirstChild("leaderstats") if not stats then return end - if stats.Монеты.Value >= price then - stats.Монеты.Value = stats.Монеты.Value - price + if stats['Монеты'].Value >= price then + stats['Монеты'].Value = stats['Монеты'].Value - price bought = true print("Куплено! Цена: " .. price) part.Transparency = 0.7 @@ -1010,7 +1010,7 @@ end local function onClick(player) local stats = player:FindFirstChild("leaderstats") if stats and stats:FindFirstChild("Клики") then - stats.Клики.Value = stats.Клики.Value + 1 + stats['Клики'].Value = stats['Клики'].Value + 1 end end