I had to re-script this function for it to work -
HTML Code:
function getLevelFilePath(temp.levelName) {
temp.path = findfiles(temp.levelName, 1);
if (temp.path == null) return;
return temp.path[0].substring(7);
/* -- OLD
temp.fileList = {};
temp.fileList.loadfolder("levels/*", 1);
for (temp.filePath: temp.fileList) {
temp.fileName = extractfilename(temp.filePath);
if (temp.fileName == temp.levelName) {
return temp.filePath;
}
}
return NULL;
*/
}