A problem with this bgt game
Hello! I am making a bgt game which contains some settings. My problem is that i get an error. Here is my code and the error i get:
file save;
bool hello = true;
#include "dynamic_menu.bgt"
sound bat;
sound batkil;
sound idi;
sound Weapon;
sound avast;
dynamic_menu menu;
dynamic_menu virus;
dynamic_menu reason1;
dynamic_menu reason2;
dynamic_menu reason3;
dynamic_menu settings;
dynamic_menu sett1;
tts_voice voice;
timer batt;
timer avvast;
int bat_hp = 100;
int cash = 10000;
int currentlives = 0;
int avvvast = 500;
void main ()
{
bat.load ( "bat.wav");
batkil.load ( "batkil.wav");
weapon.load ( "weapon.ogg");
avast.load ( "avast.ogg");
show_game_window (Bat killer beta 2.0.1);
dictionary data;
data.set (the "cash", cash);
serialize (data);
data.get (the "cash", cash);
if (tere = true)
{
voice.speak_wait ("Welcome to the batiller! Have you ever wanted to give the bat a bat? Now have your chance!");
}
else voice.speak_wait ("Menu Main Menu");
menu.add_item_tts ("Start killing");
menu.add_item_tts ( "Help");
menu.add_item_tts ( "Little Shop");
menu.add_item_tts ("Avast to death!");
menu.add_item_tts ( "Anti-virus Questionnaire");
menu.add_item_tts ( "Regulations");
menu.add_item_tts ("Shit game, I want to close this!");
int choose = menu.run ("Use arrow keys to select the switch and press enter!", true);
if (choose == 1)
{
game();
}
if (choose == 2)
{
guide();
}
if (choose == 3)
{
a small shop ();
}
if (choose == 4)
{
avvvvast ();
}
if (choose == 5)
{
viiirus ();
}
if (choose == 7)
{
wohexit ();
}
if (choose == 6)
{
settings.add_item_tts ("Show welcome message when game starts");
int weapon = options.run ("Switch option", true);
if (pos == 1)
{
aset1.add_item_tts ( "Off");
aset1.add_item_tts ( "On");
}
}
if (save.open ( "save.ini"))
{
tere = string_to_number (save.read (1));
}
int koose = plac1.run ("Select on or off", true);
if (koose == 1)
{
save.seek (1);
save.write ( "2");
tere = true;
}
if (koose == 1)
{
save.seek (1);
save.write ( "3");
tere = false;
}
if (save.read (1) == '3')
{
tere = false;
}
}
void avvvvast ()
{
while (! key_pressed (KEY_ESCAPE))
{
avast.play_looped ();
if (key_pressed (KEY_RETURN))
{
weapon.play ();
avvvast = avvvast-20;
}
if (avv. children> 20000 && avvvast> 15)
{
avast.stop ();
alert ( "Fuck the devil", "You failed!");
wohexit ();
}
if (avvast.children <20000 && avvvast <15)
{
avast.stop ();
alert ("JESSSSSSSSSSSSSSSS", "NOW ITS AVAST HAS BEEN DELETED! JEEEE'S LIKE SHIT-AVASTTTTTTTTTTTTTTTTTTTT!");
wohexit ();
}
}
}
void wohexit ()
{
alert ( "Hello", "Hey hey!");
exit ();
}
void game ()
{
while (! key_pressed (KEY_ESCAPE))
{
bat.play_looped ();
if (batti.elapsed> 600 && bat.playing && bat_hp> 0 && currentlives> 0 && key_pressed (KEY_SPACE))
{
batti.restart;
bat_hp = 0;
bat.stop ();
batkil.play ();
voice.speak_wait ("Wow! Then Wow! Woooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo!");
wohexit ();
}
if (batti.elapsed <60000 && bat.playing && bat_hp <15)
{
batti.restart;
bat.stop ();
voice.speak_wait ("Wooooooooooooooooooooooooooooooohooooooooooooooooooooooooooooooo! So ou mai Gaad! Well done!");
wohexit ();
}
if (batti.elapsed> 60000 && bat.playing && bat_hp> 0)
{
batti.restart;
bat.stop ();
batkil.play ();
idi.play ();
}
if (key_pressed (KEY_RETURN))
{
bat_hp = bat_hp-15;
weapon.play ();
}
if (key_pressed (KEY_H))
{
voice.speak_wait (Bat hp + bat_hp);
}
}
}
void help ()
{
tts_voice voice;
voice.speak_wait ("Press h to view the bat's gentle and enter to shoot, currently no firing sound is available. You have about 60 seconds to kill the bat, but if you can't do that ... I probably won't have to explain the main menu because all the options are there ... Well, take it for granted. If you have any suggestions for improvement, I already have a few in mind, so tell me eg in a crazy party by chatting. Guud lak. This is the first beta of this game so bugs are on. Have fun! , pliiiiiis, break your fingers! ");
main ();
}
void convenience store ()
{
tts_voice voice;
voice.speak_wait ("Welcome to the small shop! Here, you can buy instant kills, so if you have one and press space, the bat will die instantly! But if you do buy instant killer paena i! And so, I won't tell you how many you have bought, it depends on how many times you press i, so be careful not to waste all your money! Press Escape to return to the main menu. ");
while (true)
{
if (key_pressed (KEY_I))
{
cash = cash-2000;
currentlives ++;
}
if (cash <0)
{
voice.speak_wait ( "! Eieieieieieieieieieieieieiei Do not you understand that you can not buy anything Now you have to start the whole game again Now press the escape Well, I'm such a good mood that I can to bear as Noinnnnn it for you!!..!");
wohexit ();
}
if (key_pressed (KEY_ESCAPE))
{
main ();
}
}
}
void virus ()
{
tts_voice voice;
voice.speak_wait ("Welcome to the antivirus survey! In this poll, we will ask you questions about the antivirus software. Use the up and down arrow keys to select the switch and press enter. Let's start!");
virus.add_item_tts ("Avast of course!");
virus.add_item_tts ("F secure!");
virus.add_item_tts ("Windows defender is the best of them!");
virus.add_item_tts ("I do not use antivirus programs, they are useless. However, I do not download any dangerous files from the Internet!");
int virus = virus.run ("Which of the following antivirus programs is best? When you choose, you will be prompted to choose a suitable reason.", true);
if (Virus == 4)
{
voice.speak_wait ("Yeah! So you don't use any antivirus software? Then the whole poll was here! Remember it's your responsibility not to download a crazy party.bat file with virus codes. That's not my fault Satan's scanner ! Well, isn't that a case here, hey! ");
main ();
}
if (Virus == 2)
{
syy2.add_item_tts ("It's so wonderfully safe!");
syy2.add_item_tts ("It's so easy to install!");
int sy3 = syy2.run ("Choose why f secure is best", true);
if (SY3 == 1)
{
voice.speak_wait ("Yeah, that's a bit too safe sometimes. But Noni, huh, this is not it. If you have any suggestions for improvement on this poll or the batchiller in general, you can post the effects like crazy Party chat. Or WhatsApp, of course!");
}
if (SY3 == 2)
{
voice.speak_wait ("Yeah, it's easy to set up but it's not achievable. Here was it. If you have repercussions for this query or batchiller in general, you can post them in crazy Party chat or WhatsApp, of course!");
}
}
if (Virus == 1)
{
syy1.add_item_tts ("Avast is so easy to remove.");
syy1.add_item_tts ("Avast is safe.");
int sy1 = syy1.run ("Why is Avast the best? Choose.", true);
if (SY1 == 1)
{
voice.speak_wait ("Um ... I don't agree, Avast is easy to install, but it's not really easy to uninstall! Thanks for responding, you can send me suggestions for this game and the next beta 3.0 eg via crazy party chat or WhatsApp.") ;
}
if (SY1 == 2)
{
voice.speak_wait ("Avoid sustaki Avast oo too safe sometimes. Not worth installing! Thanks for your answer. You can send me suggestions for the next beta 3.0, for example in crazy Party chat or WhatsApp.");
}
}
if (Virus == 3)
{
syy3.add_item_tts ("It is completely achievable.");
syy3.add_item_tts ("It will be finished with win10.");
int sy3 = syy3.run ("Why is windows defender the best? Choose from the following options.", true);
if (SY3 == 1)
{
voice.speak_wait ("Yeah, that's right! There may be exceptions to that too. Thanks for your answer. If you have any suggestions for the next beta 3.0, please post them in, for example, crazy Party chat. Or whatsApp. I can tell you that new, but before that there are a couple of intermediate versions, when it's beta2.1, there will be at least 2.1.1, and / or 2.2, each version has something new! You'll notice it as you browse through the main menu, there will be more and more options. This was here. ");
main ();
}
if (SY3 == 2)
voice.speak_wait ("Yeah right, you don't need to install any widun programs! Here was it. If you have any suggestions for batkiller for the next beta 3.0, please post them for example in crazy Party Chat or WhatsApp. At least version 2.1 is coming before beta3.0 arrives and / or 2.1.1. Every version has something new! You can notice it by browsing the main menu, there are more and more options available! This was here. Hi! ");
main ();
}
}
Don't care about the bad english. And here is the error
File: C:\Users\marco\Desktop\batkiller\bat_killer2.0.1.bgt
On line: 26 (1)
Information: Compiling void main()
File: C:\Users\marco\Desktop\batkiller\bat_killer2.0.1.bgt
On line: 92 (9)
Line: if(save.open("save.ini"))
Error: No matching signatures to 'file::open(const string)'
File: C:\Users\marco\Desktop\batkiller\bat_killer2.0.1.bgt
On line: 92 (9)
Information: Candidates are:
File: C:\Users\marco\Desktop\batkiller\bat_killer2.0.1.bgt
On line: 92 (9)
Information: bool file::open(const string&in, const string&in) const
File: C:\Users\marco\Desktop\batkiller\bat_killer2.0.1.bgt
On line: 94 (6)
Line: hello=string_to_number(save.read(1));
Error: Can't implicitly convert from 'double' to 'bool&'.
-- Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector