so i have this code
Code:
new Song[ 64 ][ 10 ]
public read_sample()
{
// get path from amxx config dir
new path[32]
get_configsdir(path, charsmax(path)) // now config dir in path stored
// store file dir in path
formatex(path, charsmax(path), "%s/medialist.ini", path) // store complette path to file
// check if file exists
if (file_exists(path))
{
// do stuff
// if u don't know how much lines have the file
// use while state, i = integer, sz = string
new szData[33], szName[32], szFileName[64], iTextLength, iLine
// reads line from file. returns index of next line or 0 when end of file is reached.
while (read_file(path, iLine, szData, charsmax(szData), iTextLength) != 0)
{
// check if more lines in the file as g_szSample[] can store...
if (iLine > 10)
break // this stop the while
// found what on the line
parse(szData, szName, charsmax(szName), szFileName , charsmax(szFileName) )
// now u can check, what is stored in szSample
// comment or blank line = continue, read a new line!
if (szName[0] == ';' || !szName[0])
{
// increase the line by 1
iLine++
continue
}
// if not comment or blank line
// so new can new work on it
// store the text in a golbal string var (g_sz)
Song[iLine] = szName[iLine]
szFileName[iLine] = File[iLine];
// increase the line by 1
iLine++
}
}
}
and when i try to realy use it in my menu its wont write the string