#make a spellcheck

9 messages · Page 1 of 1 (latest)

tough kelp
#

i want to make Scrabble like game how do i keep like a dictionary/database file for spellcheck?
what kind of file should i use?

tardy zinc
#

you could split for lines and read every word by itself

#
var file = file_text_open_read(working_directory + "yourwordlist.txt")

global.words = []

while !file_text_eof(file)
{
  array_push(global.words, file_text_readln(file));
}

file_text_close(file);
#

loading would roughly look like that

sinful edge
#

if you make a text file that's just all the words comma-separated, you can load the whole string onto a variable, then use string_split to separate it into an array

#

can also have a json which is just 1 array, then load the json wholesale and boom you have an array

tough kelp
#

Thank you very much

mental jacinth