Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

expected 'end' (to close 'function' at line 17) got <eof> How do I fix this?

Asked by 5 years ago

--In this script is a series of defined variables --There are a lot of these variables and to keep things short and sweet I've omitted them from ------this question

Any help is much appreciated thanks guys

01local function Start()
02    local Dart = Instance.new('Part') do
03    -- Set up the dart part
04        Dart.Name = 'Dart'
05        Dart.FormFactor = Enum.FormFactor.Custom --NOTE: This must be done before                                                     changing Size
06        Dart.Size = dartsize
07        Dart.CanCollide = false
08    -- Add the mesh
09        local mesh = Instance.new('SpecialMesh', Dart)
10        mesh.MeshId = dartmesh
11            mesh.Scale = meshscale
12    -- Add a force   to counteract gravity
13        local bodyForce = Instance.new('BodyForce', Dart)
14        bodyForce.Name = 'Antigravity'
15        bodyForce.force = Vector3.new(0, Dart:GetMass() * Gravity, 0)
View all 30 lines...
0
Have you tried: Reading the error? Fifkee 2017 — 5y
0
Yup ExHydraboy 30 — 5y

3 answers

Log in to vote
0
Answered by
3wdo 198
5 years ago

put a end on line 18 with a end) so it would be like

01local function Start()
02    local Dart = Instance.new('Part') do
03    -- Set up the dart part
04        Dart.Name = 'Dart'
05        Dart.FormFactor = Enum.FormFactor.Custom --NOTE: This must be done before                                                     changing Size
06        Dart.Size = dartsize
07        Dart.CanCollide = false
08    -- Add the mesh
09        local mesh = Instance.new('SpecialMesh', Dart)
10        mesh.MeshId = dartmesh
11            mesh.Scale = meshscale
12    -- Add a force   to counteract gravity
13        local bodyForce = Instance.new('BodyForce', Dart)
14        bodyForce.Name = 'Antigravity'
15        bodyForce.force = Vector3.new(0, Dart:GetMass() * Gravity, 0)
View all 30 lines...
Ad
Log in to vote
0
Answered by 5 years ago

put an end at line 18

0
I could do that but it creates more errors in its place and the variables offset the code lines ExHydraboy 30 — 5y
Log in to vote
0
Answered by 5 years ago
Edited 5 years ago

Solution: I put end at line 18 and it solved the initial issue. Thanks @newton162 and @AlbertoMiAmigo2.

Note: The issue was actually some misplaced variables.

Answer this question