Gabriel,
The problem si that you declare your sound handles as if they were elements
of an array which has already been created, but you first need to declare
the array of handles before assigning or referring to them.

Best Regards,
Hayden


-----Original Message-----
From: Gamers [mailto:[email protected]] On Behalf Of Gabriel
Battaglia (Kriyaban)
Sent: Tuesday, February 12, 2013 4:15 AM
To: Gamers Audissey Mailinglist
Subject: [Audyssey] BGT help me please: sound objects array.

Hi dear all.

Could you please help me to fix this error?

This is just a small example that reproduce it.

tone_synth[] synth(2);
void main()
{
 synth[0].waveform_type=3;
 synth[1].waveform_type=3;
 synth[0].note_ms("C4",130);
 synth[1].note_ms("C6",130);
 //Error in the following line
 sound@ tasto[0] = synth[0].write_wave_sound();  sound@ tasto[1] =
synth[1].write_wave_sound();  tasto[0].play_wait();  tasto[1].play_wait(); }

The interpreter says:
File: [...]
On line: 3 (1)
Information: Compiling void main()

File: [...]
On line: 9 (7)
Line:  sound@ tasto[0] = synth[0].write_wave_sound();
Error: Expected ';'

File: [...]
On line: 10 (7)
Line:  sound@ tasto[1] = synth[1].write_wave_sound();
Error: Expected ';'


I can't understand why it is not allow to use indexes in this sort of
assignement. If I erase the [0] and [1] indexes, the script runs correctly.

Thanks for your appreciated help.
Gabriel. 


---
Gamers mailing list __ [email protected] If you want to leave the list,
send E-mail to [email protected].
You can make changes or update your subscription via the web, at
http://mail.audyssey.org/mailman/listinfo/gamers_audyssey.org.
All messages are archived and can be searched and read at
http://www.mail-archive.com/[email protected].
If you have any questions or concerns regarding the management of the list,
please send E-mail to [email protected].


---
Gamers mailing list __ [email protected]
If you want to leave the list, send E-mail to [email protected].
You can make changes or update your subscription via the web, at
http://mail.audyssey.org/mailman/listinfo/gamers_audyssey.org.
All messages are archived and can be searched and read at
http://www.mail-archive.com/[email protected].
If you have any questions or concerns regarding the management of the list,
please send E-mail to [email protected].

Reply via email to