【问题标题】:ServerScriptService.Script:42: Expected ')' (to close '(' at column 67), got ','ServerScriptService.Script:42:预期的 ')'(在第 67 列关闭 '('),得到 ','
【发布时间】:2021-01-21 21:31:20
【问题描述】:

我是 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)

【问题讨论】:

  • 在文件末尾追加)

标签: lua syntax-error roblox


【解决方案1】:

阅读错误信息

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(

这看起来有点不完整,你不觉得吗?

使用文本编辑器自动完成成对出现的所有内容,并突出显示单独出现的所有内容。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-07-25
    • 2018-09-14
    • 1970-01-01
    • 2023-03-18
    • 2021-05-18
    • 1970-01-01
    相关资源
    最近更新 更多