Raised This Month: $ Target: $400
 0% 

read file


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Sanjay Singh
Veteran Member
Join Date: Sep 2016
Old 01-08-2020 , 06:29   Re: read file
Reply With Quote #7

Quote:
Originally Posted by Sanjay Singh View Post
How can i store lines data in array?
Its not working properly sometimes it just print 1st array or sometimes last.
Code

PHP Code:
new StoreData[128][128];
new 
testfile[255];

public 
loadStoreData()
{
    
get_configsdir(testfile,255)
    
format(testfile,255,"%s/test.ini",testfile)

    new 
line;
    new 
file fopen(testfile,"r")

    if(
file)
    {
        new 
data[128]
        while(
fgets(filedata127))
        {
            if(
data[0] == ';' || !data[0]) continue
            
parse(datadata127)

            
StoreData[line] = data
            line
++
        }
        
fclose(file)
    }

    for(new 
0sizeof linei++){ 
        
server_cmd("say %s"StoreData[i]);
    }

bdw whats error in this? why this one not working
__________________
Sanjay Singh is offline
Send a message via AIM to Sanjay Singh
 



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:57.


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