Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

End Of Function?

I have this script and in the Output it says: Workspace.HandtoGui.HantoScript:48: '' 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

3 comments

0

eof means end_of_file.

0

please elaborate a bit more. What Is the problem? what are you trying to do?

0

I am doing something like if this happens then #equal 1, elseif # = 2

1 answer

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.

This discussion is preserved as it was. New answers, comments, and votes are closed.