The correct way to call this function would be to do this?
PHP Code:
#define file "filename.ext";
// Get File Location.
new cfgdir[256], flpath[256];
get_configsdir(cfgdir, 255);
format(flpath, 255, "%s/%s", cfgdir, file);
if (file_exists(flpath) == 1) {
// Read From File.
new line = 0, text[128][32], len = 32, txtLen = 32;
while (read_file(flpath, line, text, len, txtLen) != 0 && line != 128) {
text[line] = text;
line++;
}
} else {
// Can't Load From File! Throw Warning & Unload Plugin.
}
The file name limit, and path limit. If I can remember correctly, some Windows installs had a problem with file names over 64 characters, and the path could not be greater then 255 (with the 256'th place holding the zero terminator.) I was wondering if anyone had this information on hand for AMX plugins.
Sources:
Microsoft: Path to long error &
Joel Spolsky: Back to Basics.
__________________