Hello! I read the how to use sound_pool in bgt, but i get this error... Here is the code and the error:
#include "dynamic_menu.bgt"
#include "sound_pool.bgt"
void main()
{
tts_voice voice;
show_game_window("Hamburger");
dynamic_menu menu;
menu.add_item_tts("Start the adventure");
menu.add_item_tts("achievements");
menu.add_item_tts("exit");
int choice=menu.run("choose an option from the menu",true);
if(choice==1)
{
game();
}
}
void game()
{
sound_pool poool;
int player_x;
int player_y;
while(true);
{
poool.max_distance =50;
poool.play_stationary("music.wav",false);
if(key_pressed(KEY_RIGHT))
{
player_x>1;
player_y>2;
poool.update_listener_2d(player_x,player_y);
}
else
{
alert("error!","An error occurred");
}
if(key_pressed(KEY_LEFT))
{
player_x<1;
player_y<2;
}
}
}
File: C:\Users\marco\Desktop\furia\furia.bgt
On line: 17 (1)
Information: Compiling void game()
File: C:\Users\marco\Desktop\furia\furia.bgt
On line: 29 (9)
Line: player_x>1;
Warning: 'player_x' is not initialized.
File: C:\Users\marco\Desktop\furia\furia.bgt
On line: 30 (9)
Line: player_y>2;
Warning: 'player_y' is not initialized.