So clearly I am having some issue with getting this loop to work. It’s a little difficult to explain what it does but I will try to simplify. Essentially, I have a variable called ‘lsetting,’ this variable tells the game which of the words from each of the dictionary term arrays to use for the variable.
An example of an array for the dictionary looks like this:
*create_array ad_Hui 6 "輝" "辉" "Huī" "Hui" "Hui" "radiance"
So if lsetting is 1 it’ll set Hui to “輝”, if lsetting is 3 it’ll set Hui to “Huī”, etc.
So the loop is something like this…
*temp temp_dictindex (atd_index[1])
*temp temp_wordcount 1
*temp temp_indexcount 1
*temp temp_translatingword ({("atd_" & temp_dictindex) & "_1"})
*label translation_loop
*if temp_wordcount >= {("atd_" & temp_dictindex) & "_count"}
*set temp_wordcount 1
*set temp_indexcount + 1
*if atd_index_count < temp_indexcount
*return
*set temp_dictindex (atd_index[temp_indexcount])
*set temp_translatingword ({("atd_" & temp_dictindex) & ( "_" & temp_wordcount)})
*goto translation_start
*set {temp_translatingword} {(("ad_") & (temp_translatingword & "_")) & (lsetting)}
*set temp_wordcount + 1
*set temp_translatingword {("atd_" & temp_dictindex) & ("_" & temp_wordcount)}
*if ((temp_indexcount <= atd_index_count))
*goto translation_start
*else
*return
atd stands for “array translation dictionary” and they are essentially a set of variable names for translating each of the terms.
*create_array atd_index 3 "cnames" "spclass" "geography"
*create_array atd_cnames 20 "Qing" "Hui" "Xiao" "Jiang" "Min" "Yong" "Yuan" "Wen" "Yuzu" "Fu" "Ru" "Bai" "Yan" "Jiaxian" "Ningyu" "Zhen" "Tang" "Daiyu" "Tao" "Yaoxing"
*create_array atd_spclass 16 "xiantian" "shen" "human" "Huangshi" "Guizu" "Shi" "Seng" "Yishi" "Xiucai" "Jinshi" "Huanguan" "Gongnu" "Nong" "Gong" "ShangP" "ShangM"
*create_array atd_geography 16 "ncity" "wcity" "scity" "ecity" "ccity" "mountainrange" "majordesert" "wsea" "esea" "iisles" "sbcountry" "wbcountry" "outertemple" "citytemple" "market" "rumansion"
*create_array atd_miscellaneous 5 "lengthli" "lengthzhang" "lengthchi" "timeshi" "timeki"
I’m just not certain on how to get it to stop infinitely looping? Clearly I am missing whatever I need to close the loop?