Raised This Month: $ Target: $400
 0% 

[SOLVED] Getting argument from vars in file ( like csdm.cfg )


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Empowers
BANNED
Join Date: Feb 2009
Location: Ukraine
Old 04-03-2009 , 14:18   [SOLVED] Getting argument from vars in file ( like csdm.cfg )
Reply With Quote #1

I have such a line in my csdm.cfg

Code:
remove_objectives = abcd

how can I get the argument "abcd" in my plugin.. I wrote only beginning of such a stock:
PHP Code:
stock csdm_get_remove_objectives()
{    
    static 
ConfigsDir[128], Filename[150], ReadData[512]
    
get_configsdir(ConfigsDir127)
    
format(Filename139"%s/csdm.cfg"ConfigsDir)
    
    if(!
file_exists(Filename))
        return;
    
    static 
len,currline
    
    
while(read_file(FilenamecurrlineReadData511len))
    {
        
// check if the line is empty
        
if (!len)
            continue;
            
        
// here should check does
        // string "remove_objectives" 
        // exists on current line ( currline )
        // and get what's after =

    
}

Any suggestions?

Last edited by Empowers; 04-03-2009 at 16:10.
Empowers is offline
Send a message via ICQ to Empowers
 



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 02:25.


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