Advertisement
Jousway

shit

Apr 24th, 2016
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.30 KB | None | 0 0
  1. if song then
  2.     local songDir = song:GetSongDir();
  3.     local dir = FILEMAN:GetDirListing(songDir);
  4.     local fileToLoad = nil;
  5.  
  6.     for i=1,#dir do
  7.         if  string.find(dir[i],".sm") then
  8.             fileToLoad = dir[i];
  9.             self:Load(songDir..fileToLoad);
  10.         end;
  11.     end;               
  12. else
  13.     -- fallback crap for not having a song
  14. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement