Having issues when trying to divide my bgt script into functions

Hey all.
I've run into an interesting and somewhat frustrating issue.
Take a look at the following:
void main()
{
show_game_window("ding");
sound ding;
ding.load("c:\\windows\\media\\ding.wav");
wait(5);
dingplay();
}
void dingplay()
{
ding.play_looped();
}
Now, if I try and run this I get:
File: C:\Users\unstoppable\Documents\function test.bgt
On line: 9 (1)
Information: Compiling void dingplay()
File: C:\Users\unstoppable\Documents\function test.bgt
On line: 11 (1)
Line: ding.play_looped();
Error: 'ding' is not declared
When clearly if it looks back a function, yes it is.
What am I doing wrong here?
I've followed all the tutorials as closely as I could, but still this issue won't go away.
Thanks in advance!

_______________________________________________
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector
  • ... AudioGames . net Forum — Developers room : Omar Alvarado via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : lukas via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Omar Alvarado via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : audiogames . net fan via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Genroa via Audiogames-reflector

Reply via email to