ServerScriptService.Script:42: 预期 ')' (在列 67 处关闭 '('),得到了 ','

我是Roblox Lua脚本的新手,练习我的动态函数技能时,我发现了一个无法修复的错误。错误是本帖的标题。我尝试通过添加新括号和删除一些括号来解决它,但是我无法解决它。这是代码,谢谢。

    local mypart = Instance.new("Part")
    mypart.Name = name
    mypart.Transparency = 0.5
    mypart.BrickColor = BrickColor.new("Burgundy")
    mypart.Position = Vector3.new(5,5,5)
    mypart.Anchored = anchored
    mypart.Material = ("Ice")
    mypart.Parent = game.Workspace
    mypart.Reflectance = reflectance
end
generatePart("ArgumentOne", false, 0.7)
generatePart("ArgumentTwo", false, 0.7)

function owo(name, material, anchored, color)
    local gamermove = Instance.new("Part")
    gamermove.Name = name
    gamermove.Position = Vector3.new(9,9,9)
    gamermove.Transparency = 0.5
    gamermove.Anchored = anchored
    gamermove.BrickColor = color
    gamermove.CanCollide = true
    gamermove.Material = material
    gamermove.Parent = game.Workspace
end

owo("LoLoLolsoawdoaldowalda", ("Ice"), false, BrickColor.new("Black"))
owo("asdaasdasda", ("Ice"), false, BrickColor.new("Beige"))
owo("dawsdajkdnaw", ("Ice"), false, BrickColor.new("Bright bluish green"))

function gamer(name, transparency, anchored, material, parent, CanCollide, Vectorisa)
    local gamer = Instance.new("Part")
    gamer.Name = name
    gamer.Transparency = transparency
    gamer.Anchored = anchored
    gamer.Material = material
    gamer.Parent = parent
    gamer.CanCollide = CanCollide
    gamer.Position = Vectorisa
end

gamer(("Free6ix9ine"), 0.5, false, ("Ice"), game.Workspace, true, (10,10,10)
点赞
用户2858170
用户2858170

阅读错误信息:

ServerScriptService.Script:42: 预期 ')'(关闭位于第67列的'('),但得到 ','

转到代码的第42行:

gamer(("Free6ix9ine"), 0.5, false, , (10,10,10)("Ice"), game.Workspace, true, (10,10,10)

在你的脑海中,从内向外去掉所有看起来没问题的东西:

("Free6ix9ine"), 0.5, false, , (10,10,10)("Ice"), game.Workspace, true, (10,10,10)

剩下的是:

gamer(

看起来好像不完整,对吧?

使用一个能自动补全成对内容并突出显示任何孤立的内容的文本编辑器。

2021-01-21 13:31:20