View difference between Paste ID: 0mWFrzCp and RzKa0AG7
SHOW: | | - or go back to the newest paste.
1
local function lookForWord( target )
2
3
	levelName = currentLevel..currentLevelName..".txt"
4
	local path = system.pathForFile(levelName, system.ResourceDirectory)
5-
	local file = io.open(path)
5+
	for line in io.lines(path) do
6
		for word in line:gmatch( "[^,]+" ) do
7-
	for line in file:lines() do
7+
			if word == target then
8-
	    for word in line:gmatch( "[^,]+" ) do
8+
				return true
9-
		    if word == target then
9+
			end
10-
			    return true
10+
        	end
11-
				break
11+
	end
12-
			else
12+
	return false
13-
				return false
13+