Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function lookForWord( target )
- levelName = currentLevel..currentLevelName..".txt"
- local path = system.pathForFile(levelName, system.ResourceDirectory)
- for line in io.lines(path) do
- for word in line:gmatch( "[^,]+" ) do
- if word == target then
- return true
- end
- end
- end
- return false
- end
Advertisement
Add Comment
Please, Sign In to add comment