.:HyPeX:. Posted February 9, 2015 Share Posted February 9, 2015 Hello everyone, so far i'm trying to understand a bit things on how to customly load resources. My question so far is how to retrive the .mp3 files loaded in the meta. XML Atributes maybe, but how? Thanks HyPeX Link to comment
Gallardo9944 Posted February 9, 2015 Share Posted February 9, 2015 check nodes called "file", take attributes called "src" and check their extension. Link to comment
.:HyPeX:. Posted February 10, 2015 Author Share Posted February 10, 2015 check nodes called "file", take attributes called "src" and check their extension. how do i check their extension? Split by the . and then check for the rest? (Or find by .mp3?) Link to comment
Tomas Posted February 10, 2015 Share Posted February 10, 2015 An example: local filepath = "songs/rock.mp3" local filepath = string.gsub(filepath,"songs/","") local songName = gettok(filepath,1,string.byte('.')) local songExtension = gettok(filepath,2,string.byte('.')) print(songName) -- > rock print(songExtension) -- > mp3 Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now