Resources.Load() doesn't work unless load path is hard coded.

I have been making a system that allows for me to load different music tracks.

In a text file i have all the necessary load paths for each track in the resources folder, each of them are slightly different based on what music track it is.

I load the text file and turn the text file into an array of strings, then I attempt to load an audio clip from another part of resources based on one of the load paths in that array. This doesn’t work, but when I take the load path and hard code it into the resources.load function it works.

[171359-code-notworking.png*|171359]
_
here’s the example code that isn’t working. No errors are thrown for this at all
_

[171360-code-working.png*|171360]
_
Here’s the example code that does work, the only difference is that the load path is hard coded, even though it’s copied directly from the array of strings
_

NOTE: The part where it says newLoadMusic = chosenTracks.Loadpath should actually be
newLoadMusic = loadedTracks*.Loadpath. This also still doesn’t work*
_
Is there something wrong with the way this has been coded, if so should i avoid using text files to keep load paths saved? Any ideas or help are greatly appreciated
*
*

Fixed it!

Turns out there was an invisible character (most likely an
) which prevented the load path from working, simply using the .Trim() function on the string prevented this from happening