Guest User

Untitled

a guest
Jul 17th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.44 KB | None | 0 0
  1. // Get the params
  2. if ( [commandParts count] >= 6 )
  3. {
  4. NSArray *ids = nil;
  5. NSArray *caches = nil;
  6. NSArray *bgs = nil;
  7. NSArray *wavURLs = nil;
  8. NSArray *mp3URLs = nil;
  9. NSString *errMsg = nil;
  10.  
  11. // id=[soundID],[soundID],...
  12. paramParts = [[commandParts objectAtIndex: 1] componentsSeparatedByString: @"="];
  13. if ( [paramParts count] >= 2 )
  14. {
  15. ids = [[paramParts objectAtIndex: 1] componentsSeparatedByString: @","];
  16. }
  17.  
  18. // cache=[1|0],[1|0],...
  19. paramParts = [[commandParts objectAtIndex: 2] componentsSeparatedByString: @"="];
  20. if ( [paramParts count] >= 2 )
  21. {
  22. caches = [[paramParts objectAtIndex: 1] componentsSeparatedByString: @","];
  23. }
  24.  
  25. // bg=[1|0],[1|0],...
  26. paramParts = [[commandParts objectAtIndex: 3] componentsSeparatedByString: @"="];
  27. if ( [paramParts count] >= 2 )
  28. {
  29. bgs = [[paramParts objectAtIndex: 1] componentsSeparatedByString: @","];
  30. }
  31.  
  32. // wav=[soundURL],[soundURL],...
  33. paramParts = [[commandParts objectAtIndex: 4] componentsSeparatedByString: @"="];
  34. if ( [paramParts count] >= 2 )
  35. {
  36. wavURLs = [[paramParts objectAtIndex: 1] componentsSeparatedByString: @","];
  37. }
  38.  
  39. // mp3=[soundURL],[soundURL],...
  40. paramParts = [[commandParts objectAtIndex: 5] componentsSeparatedByString: @"="];
  41. if ( [paramParts count] >= 2 )
  42. {
  43. mp3URLs = [[paramParts objectAtIndex: 1] componentsSeparatedByString: @","];
  44. }
Add Comment
Please, Sign In to add comment