Code:
while(read_dir("maps",numword,data,63,temp)) {
if((contain(data,".bsp") != -1) && (containi(data,".ztmp") == -1)) {
if(totalmaps >= MAX_MAPS){
server_print("[AMXX] MAX_MAPS has been exceeded, not all maps are able to load for searching")
return PLUGIN_HANDLED
}
copy(T_LMaps[totalmaps],31, data)
replace(T_LMaps[totalmaps],31,".bsp","")
totalmaps++
}
numword++
}
this is producing dupes in the array, usually like 10 of each map. One time I noticed the first map was duped 4 times and then after that the rest were 8 times. Really strange. I ONLY is doing this on linux systems as far as I know, have not seen it occur in windows.
Also does anyone have some code I could borrow/look at for sorting an array?
__________________