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(file, data, 127))
{
if(data[0] == ';' || !data[0]) continue
parse(data, data, 127)
StoreData[line] = data
line++
}
fclose(file)
}
for(new i = 0; i < sizeof line; i++){
server_cmd("say %s", StoreData[i]);
}
}
__________________