Raised This Month: $ Target: $400
 0% 

Why my pluggin dont create file .ini?


Post New Thread Reply   
 
Thread Tools Display Modes
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
pokemonmaster
princess milk
Join Date: Nov 2010
Location: Somewhere in this world
Old 01-20-2014 , 10:45   Re: Why my pluggin dont create file .ini?
Reply With Quote #2

I'm not sure but according to this i belive that fopen doesn't have a "t" mode, try removing it.
__________________
اَشْهَدُ اَنْ لَّآ اِلٰهَ اِلَّا اللہُ وَحْدَه لَا شَرِيْكَ لَه وَ اَشْهَدُ اَنَّ مُحَمَّدًا عَبْدُه وَرَسُوْلُه
No longer active in AMXX. Sorry.
pokemonmaster is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 01-20-2014 , 10:59   Re: Why my pluggin dont create file .ini?
Reply With Quote #3

Quote:
Originally Posted by pokemonmaster View Post
I'm not sure but according to this i belive that fopen doesn't have a "t" mode, try removing it.
https://web.archive.org/web/20120725...?go=func&id=92
t is valid for AMXX
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
Reply


Thread Tools
Display Modes

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