added a word not found allert to stderr when word is not in dictionary

This commit is contained in:
Bizcochito
2022-05-07 21:26:44 +02:00
parent 81d25ec8f1
commit 3d0fc9145f
3 changed files with 83 additions and 212 deletions

View File

@@ -125,7 +125,8 @@ function add_word(str)
end
end
if add then
table.insert(word_list,str)
table.insert(word_list,str)
if not in_dictionary(str) then io.stderr:write("Error: \""..str.."\" is not known\n") end
end
end