here is the source code:
#include "dynamic_menu.bgt"
#include "form.bgt"
tone_synth synth;
void main()
{
synth.tempo=120;
synth.waveform_type=2;
synth.note("C4", 4);
synth.note("E4", 4);
synth.note_bend("G4", -12, 4, 1, 4);
synth.waveform_type=3;
synth.note("C5", 0.666);
synth.rest(0.666);
synth.note("E5", 0.666);
synth.rest(0.666);
synth.note("G5", 0.666);
synth.rest(0.666);
synth.note_bend("C6", -12, 2, 1, 1);
sound@ output=synth.write_wave_sound();
output.play_wait();
alert("Hello", "welcome to dungeon quest. in this game, you are a prince who wakes up in a dungeon and have to escape. have fun, and remember, if you try to hack or alter this game, we will rip excalibur out of king arthur's ass, hunt you down and chop your fucking head off!");
{
dynamic_menu my_menu;
show_game_window("dungeon quest");
int menu_result;
my_menu.allow_escape=true;
my_menu.wrap=true;
my_menu.add_item_tts("ask why the cell mate woke you up");
my_menu.add_item_tts("ask for 5 more minutes");
my_menu.add_item_tts("fine, I'll get up");
install_keyhook();
my_menu.set_speech_mode(0);
menu_result=my_menu.run("your cell mate wakes you up and says wake up! what do you do?", true);
if(menu_result==-1)
{
alert("Error", "There was an error loading the menu.");
exit();
}
if(menu_result==0)
{
alert("Option", "Escape was pressed. Exiting.");
exit();
}
if(menu_result==1)
{
alert("Option", "because the voices inside my head told me to.");
}
if(menu_result==2)
{
alert("Option", "OK, I'll give you 5 more minutes, but I'm not sure about the guards.");
{
dynamic_menu secondchoice;
int choice2;
secondchoice.allow_escape=true;
secondchoice.wrap=true;
secondchoice.add_item_tts("I'm not scared of those sissy ass wimps");
choice2=secondchoice.run("what now?", true);
if(choice2==1)
{
alert("message from guard", "what did you just call me?");
{
dynamic_menu thirdchoice;
int choice3;
thirdchoice.allow_escape=true;
thirdchoice.wrap=true;
thirdchoice.add_item_tts("you heard me");
choice3=thirdchoice.run("what now?", true);
if(choice3==1)
{
alert("well, you hear me! I'mm gonna chop your fucking head off with the gillateen! you pissed off the wrong mother fucker you son of a bitch! you're dead now!!");
exit();
}
}
}
else
{
string your_name=input_box("your name", "it seams you forgot your name. quick, make one up before they get suspicious!");
if(your_name=="")
{
if(get_last_error()==-12)
{
alert("OK", "If you wish to press cancel, then I will trouble you no further. Goodbye!");
exit();
}
alert("OK", "If you wish not to disclose that personal precious information, then I will trouble you no further. Goodbye!");
exit();
}
alert("Hello!", "Hello "+your_name+", nice to meet you!");
{
dynamic_menu wakeup;
int wuchoice;
wakeup.allow_escape=true;
wakeup.wrap=true;
wakeup.add_item_tts("I don't know");
wakeup.add_item_tts("I killed a guy who asked me what I did");
wuchoice=wakeup.run("well " +your_name+ "why are you here?", true);
}
}
}
}
}
}
and here is the nasty compiler error:
File: C:\dungeon quest\dungeon quest.bgt
On line: 4 (1)
Information: Compiling void main()
File: C:\dungeon quest\dungeon quest.bgt
On line: 74 (1)
Line: alert("well, you hear me! I'mm gonna chop your fucking head off with the gillateen! you pissed off the wrong mother fucker you son of a bitch! you're dead now!!");
Error: No matching signatures to 'alert(const string)'
File: C:\dungeon quest\dungeon quest.bgt
On line: 74 (1)
Information: Candidates are:
File: C:\dungeon quest\dungeon quest.bgt
On line: 74 (1)
Information: bool alert(const string&in, const string&in)