Raised This Month: $ Target: $400
 0% 

Why my pluggin dont create file .ini?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Bugg
Senior Member
Join Date: Jan 2012
Old 01-20-2014 , 08:10   Why my pluggin dont create file .ini?
Reply With Quote #1

Im used this to create a file if dont exists..

Is something wrong?

PHP Code:
public plugin_init() 

    
    
load()
   

PHP Code:
load() {
    
    
Players TrieCreate()

    
    new 
ConfigDir[64]
  
    
    
get_configsdir(ConfigDircharsmax(ConfigDir))
    
    
format(ConfigDircharsmax(ConfigDir), "%s/players.ini"ConfigDir
    
    if(!
file_exists(ConfigDir)) {
        
        
create_file(ConfigDir)
        
        return
        
    } 
PHP Code:
create_file(ConfigDir[]) {
    
    new 
File fopen(ConfigDir"wt")
    
    
fprintf(File"; :Example^"^n^n^n;Enjoy")
    
    fclose(File)
    


Last edited by Bugg; 01-20-2014 at 08:13.
Bugg is offline
 



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 10:06.


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