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

End Of Function?

Asked by 8 years ago

I have this script and in the Output it says: Workspace.HandtoGui.HantoScript:48: '<eof>' expected near 'elseif'

if VKEFNIYNZM==1 then
                if game.Players:findFirstChild(other)==nil then
                    script.Parent.Problem.Visible=true
                    script.Parent.Problem.Title.Text=other..StringConstants[4]
                else
                    script.Parent.Accept1.Visible = true
                    if script.Parent.Accept1.Yes.MouseButton1Click:connect() then
                        tool.Parent=game.Players[other].Backpack
                    end
                end
                else
                    if script.Parent.Accept1.No.MouseButton1Click:connect() then                        
                        script.Parent.Accept1.Visible = false   
                    end
                 end
               elseif VKEFNIYNZM==2 then
                script.Parent.Problem.Visible=true
                script.Parent.Problem.Title.Text=StringConstants[5]
                 elseif VKEFNIYNZM==0 then
                script.Parent.Problem.Visible=true
                script.Parent.Problem.Title.Text=StringConstants[6]..other..StringConstants[7]
            end
            end
0
eof means end_of_file. drahsid5 250 — 8y
0
please elaborate a bit more. What Is the problem? what are you trying to do? lukeb50 631 — 8y
0
I am doing something like if this happens then #equal 1, elseif # = 2 TayLife12 69 — 8y

1 answer

Log in to vote
0
Answered by
1waffle1 2908 Trusted Badge of Merit Moderation Voter Community Moderator
8 years ago

Here's the same script, but indented

if VKEFNIYNZM==1 then
    if game.Players:findFirstChild(other)==nil then
        script.Parent.Problem.Visible=true
        script.Parent.Problem.Title.Text=other..StringConstants[4]
    else
        script.Parent.Accept1.Visible = true
        if script.Parent.Accept1.Yes.MouseButton1Click:connect() then
            tool.Parent=game.Players[other].Backpack
        end
    end
else
    if script.Parent.Accept1.No.MouseButton1Click:connect() then                        
        script.Parent.Accept1.Visible = false   
    end
end

elseif VKEFNIYNZM==2 then
    script.Parent.Problem.Visible=true
    script.Parent.Problem.Title.Text=StringConstants[5]
elseif VKEFNIYNZM==0 then
    script.Parent.Problem.Visible=true
    script.Parent.Problem.Title.Text=StringConstants[6]..other..StringConstants[7]
end
end

You have too many ends.

Ad

Answer this question