Hi,
Stuck on word compare below:
Problem is "DictionaryString" is a 2-dimensional array so it does not compile.
Jesse
function LoadDictionaryLetterFile ( )
letters as String = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
DictionaryString[DictionaryLetterLoading].load( "/media/dictionary/"+Mid(letters, DictionaryLetterLoading+1,1)+"-Words.json" )
endfunction
//------------------------------------------------------------------------------------------------------------
function CheckSelectedLettersForWord ( )
CurrentWordSelected = ""
CurrentWordSelected = CurrentWordSelected + "'"
index as integer
for index = 0 to SelectedLetterWordIndex
CurrentWordSelected = CurrentWordSelected + SelectedLetters[index]
next index
CurrentWordSelected = CurrentWordSelected + "'"
letterToCheck as integer
if (SelectedLetters[0] = "A")
letterToCheck = 0
elseif (SelectedLetters[0] = "B")
letterToCheck = 1
elseif (SelectedLetters[0] = "C")
letterToCheck = 2
elseif (SelectedLetters[0] = "D")
letterToCheck = 3
elseif (SelectedLetters[0] = "E")
letterToCheck = 4
elseif (SelectedLetters[0] = "F")
letterToCheck = 5
elseif (SelectedLetters[0] = "G")
letterToCheck = 6
elseif (SelectedLetters[0] = "H")
letterToCheck = 7
elseif (SelectedLetters[0] = "I")
letterToCheck = 8
elseif (SelectedLetters[0] = "J")
letterToCheck = 9
elseif (SelectedLetters[0] = "K")
letterToCheck = 10
elseif (SelectedLetters[0] = "L")
letterToCheck = 11
elseif (SelectedLetters[0] = "M")
letterToCheck = 12
elseif (SelectedLetters[0] = "N")
letterToCheck = 13
elseif (SelectedLetters[0] = "O")
letterToCheck = 14
elseif (SelectedLetters[0] = "P")
letterToCheck = 15
elseif (SelectedLetters[0] = "Q")
letterToCheck = 16
elseif (SelectedLetters[0] = "R")
letterToCheck = 17
elseif (SelectedLetters[0] = "S")
letterToCheck = 18
elseif (SelectedLetters[0] = "T")
letterToCheck = 19
elseif (SelectedLetters[0] = "U")
letterToCheck = 20
elseif (SelectedLetters[0] = "V")
letterToCheck = 21
elseif (SelectedLetters[0] = "W")
letterToCheck = 22
elseif (SelectedLetters[0] = "X")
letterToCheck = 23
elseif (SelectedLetters[0] = "Y")
letterToCheck = 24
elseif (SelectedLetters[0] = "Z")
letterToCheck = 25
endif
// error: "findstring" does not accept the parameters (String Array, String, Integer, Integer) ?
if ( FindString(DictionaryString[letterToCheck], CurrentWordSelected, 1, 1) > 0 )
PlaySoundEffect(6)
CorrectWordTileAndCharAlpha = 255
GameStatus = ClearingWord
CheckWordRed = 0
CheckWordGreen = 255
CheckWordBlue = 0
SetSpriteColorRed( Icon[82], CheckWordRed )
SetSpriteColorGreen( Icon[82], CheckWordGreen )
SetSpriteColorBlue( Icon[82], CheckWordBlue )
CheckWordColorTimer = 25
else
PlaySoundEffect(7)
CheckWordRed = 255
CheckWordGreen = 0
CheckWordBlue = 0
SetSpriteColorRed( Icon[82], CheckWordRed )
SetSpriteColorGreen( Icon[82], CheckWordGreen )
SetSpriteColorBlue( Icon[82], CheckWordBlue )
CheckWordColorTimer = 25
endif
endfunction