SpecT Posted October 30, 2015 Posted October 30, 2015 Hey guys! Am I using it wrong or there is a problem with that function? I want to sync the song position between the client and server. So I send the length (in milliseconds) to the client using the function setSoundPosition. But for some reason it does nothing. What's the problem and am I doing it wrong ? example code: function example(soundElement,position) if isElement(soundElement) then setSoundPosition(soundElement,position) end end Thanks in advance!
myonlake Posted October 30, 2015 Posted October 30, 2015 What are you passing to the function? setSoundPosition takes in a float containing the second, not millisecond. The fractional part is the millisecond.
SpecT Posted October 30, 2015 Author Posted October 30, 2015 What are you passing to the function? setSoundPosition takes in a float containing the second, not millisecond. The fractional part is the millisecond. Aww ... now I got it lel. So second.millisecond works fine. Thanks for the reply mate!
myonlake Posted October 30, 2015 Posted October 30, 2015 What are you passing to the function? setSoundPosition takes in a float containing the second, not millisecond. The fractional part is the millisecond. Aww ... now I got it lel. So second.millisecond works fine. Thanks for the reply mate! You're welcome.
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