TChannel problem

BlitzMax Forums/BlitzMax Beginners Area/TChannel problem

Rico(Posted 2008) [#1]
Hi. What am I doing wrong here?

Global scream:TSound=LoadSound("sound/scream1.wav",0)
Global channel:TChannel=PlaySound scream


I get an error on the 2nd line about not being able to convert from TChannel(TSound,TChannel ) to Brl.Audio.Tchannel

Thank you.


Brucey(Posted 2008) [#2]
What if you add brackets to the PlaySound command?

Global channel:TChannel=PlaySound(scream)



Rico(Posted 2008) [#3]
Yes that works nicely. Thank you. I just thought the brackets were optional - I guess not!


Brucey(Posted 2008) [#4]
They are optional for a statement on its own, but when you use it as part of a variable assigment, you need to use brackets.

I believe VB works in a similar fashion.