Lua error: <eof> expected near "elseif"
Can I get it fixed please?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
NPCs[9].func = function(npc, id, words, state) if words == "hi" then NPCspeak(npc, "This cave has biggest challenge of all; the D.C") NPCspeak(npc, "Because the horror inside, you need to be at least level 75.")	 NPCspeak(npc, "Only way out is to die or teleport. Recember that.") PLAYERS[id].tmp.npcstate = {npc, 1} elseif contains(words, "bye") then NPCspeak(npc, "Wise choice, young hero.") PLAYERS[id].tmp.npcstate = nil elseif state == 1 then if contains(words, "yes") then if PLAYERS[id].Level > 75 then NPCspeak(npc, "Be warned, the shadows inside devour") 		NPCspeak(npc, "your health VERY fast. You MUST have ways of healing.") 		PLAYERS[id].tmp.npcstate = {npc, 2} end else NPCspeak(npc, "Your level isn't high enough!") 	PLAYERS[id].tmp.npcstate = nil end elseif state == 2 then 	if contains(words, "yes", "ok", "ready") then 		parse("setpos " .. id .. " 3616 6080") 		NPCspeak(npc, "Good luck young hero. You will need it.") 		PLAYERS[id].tmp.npcstate = nil 		end 	 end 	end 	 elseif contains(words, "bye", "no", "unprepared") then 	 NPCspeak(npc, "Wise choice, young hero.") 	PLAYERS[id].tmp.npcstate = nil 	 end 	 end 	end