I want to check a line from a file to see if the map name matches it and return the string from it. This current code has been crashing me. Can you spot the problem?
Code:
check(Map[], xFile[], xlen)
{
new BaseDir[64], File[64]
get_basedir(BaseDir, 63)
format(File, 63, "%s/configs/check.cfg", BaseDir)
if(file_exists(File))
{
new Text[64], Line, len = 0
while(read_file(File, Line, Text, 63, len))
{
if((Text[0] == ';') || !len)
continue
parse(Text, 63, xFile, xlen)
if(equali(Text, Map, 63))
{
break
} else {
format(xFile, len, "")
}
}
}
return xFile
}
__________________
HDD fried, failed to backup files. Sorry folks, just don't have free time anymore. This is goodbye.