Are you sure this
PHP Code:
new Handle:Dir = OpenDirectory(Directory), FileType:Type;
working as you think it is? Extra line won't hurt and looks much cleaner.
Also you are putting both directory and filename into the Filename[64] which is might be too small. There is a PLATFORM_MAX_PATH constant just for that.
And i would check what you are actually getting from
ReadDirEntry, maybe it returns extra / or something.
And the last one. Are you sure you are passing the full path in function? I guess the idea was: you have a folder structure something like this:
Code:
sound/
myubersounds/
funsounds/
music/
vote/
And passing AddFolderToPrecacheTables("sound/myubersounds") will precache all the sounds.
But when it comes to second iteration, it will pass the AddFolderToPrecacheTables("myubersounds/ololo.mp3") and then AddFolderToPrecacheTables("music/ululung.mp3"). I hope you get the idea. I don't think you are keeping the folder structure. You are using only the last folder in chain. But you need the full path for precache function to work.