lua - 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)
解决方案
阅读错误信息
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(
这看起来有点不完整,你不觉得吗?
使用文本编辑器自动完成成对出现的所有内容并突出显示其中任何一个单独出现的内容。
推荐阅读
- java - 如何在新的导航抽屉架构组件中实现分享应用或评分应用或注销功能
- javascript - 在highcharts中查找日期和时间之间的差异
- user-interface - 画布上的 Unity 粒子效果
- php - 选择值所在的数组
- ios - 如何使用 UICollectionViewController 设置具有多个部分的 1 标头
- javascript - 如何在进行另一个函数调用时停止执行 javascript/jquery
- python-3.x - 在python中设置请求刷新率
- node.js - 如何让快递服务器一次只服务一个 API 请求
- docker - 自定义使用 docker stack deploy 创建的 docker 服务名称
- haskell - 在 Liquid Haskell 中定义度量