Raised This Month: $ Target: $400
 0% 

read_file (const file[], line, text[], len, &txtLen);


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Dygear
SourceMod Donor
Join Date: Apr 2004
Location: Levittown, NY
Old 12-28-2009 , 21:00   read_file (const file[], line, text[], len, &txtLen);
Reply With Quote #1

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(cfgdir255);
format(flpath255"%s/%s"cfgdirfile);
if (
file_exists(flpath) == 1) {
    
// Read From File.
    
new line 0text[128][32], len 32txtLen 32;
    while (
read_file(flpathlinetextlentxtLen) != && 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.
__________________
Dygear is offline
Send a message via AIM to Dygear Send a message via MSN to Dygear Send a message via Skype™ to Dygear
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 04:09.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode