I’ve got an array filled using the DirectoryInfo class, however every time i try and use the data in that array, i get the error “expected “” found “/r””. Now normally ive seen this pop up for minor typos in strings but since the data im using is registering as an object i figured that could cause it too. so my dilemma is that i can’t figure out how to convert the data to a string as the ToString() function doesn’t seem to help. here’s the relevant code so far:
fileinfo = DirectoryInfo(Application.dataPath).GetFiles("*.ogg");
for (i=0 ; i< fileinfo.Length ; i++){
var tempstring = fileinfo*.Replace("\", "/");*
what the code is intending to do is convert the data in the fileinfo array, to a useable string for the WWW Class. however every time this is run, the “replace” line errors out with the error posted earlier. Ive hit a brick wall with this one. nothing i’ve found seems to help so any thoughts would be appreciated!
note that the file info variable is working as intended. i printed out the 0 variable and it was exactly what i expected. the problems i am having are to do with modifying the data contained in that variable.