Solved Converting string to sound

Discussion in 'Plugin Development' started by AstramG, Aug 29, 2013.

Thread Status:
Not open for further replies.
  1. Offline

    AstramG

    Hello, I'm trying to play a sound for the player. However I've got myself stuck. I'm trying to convert a string into a sound with an octave. Basically I have one string and there are 2 parts to it, the sound and the octave they are separated by a comma. This is what my string looks like: "fizz,2" I need to make fizz be Sound.FIZZ.

    I think that I might have solved it since Sound is an enum, and I did Sound.valueOf(String);
    Let me do my testing.

    My testing have worked and I was correct that .valueOf will convert a string to an enumeration.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 4, 2016
Thread Status:
Not open for further replies.

Share This Page