2015-03-07 10:55:20

Hello!
;Here is the error code that the compiler produces:
File: C:\Call of duty blinde\Call of duty blinde\Game.bgt
On line: 36 (1)
Information: Compiling void main()
File: C:\Call of duty blinde\Call of duty blinde\Game.bgt
On line: 85 (1)
Line: game_play();
Error: No matching signatures to 'game_play()'
And here is the code of the game, in which everything is written correctly:
#include "dynamic_menu.bgt"
#include "sound_pool.bgt"
int player_hp = 100;
int level = 1;
int pposition = 5;
int player_position = 1;
int rezult = 500;
const int board = 50;
timer steper;
sound_pool rus;
sound_pool pool;
sound new;
sound wepo;
sound_pool wep;
sound zvan;
sound zvan_ser;
sound zvan_no;
sound zvan_star_ser;
sound v1;
sound v2;
sound v3;
sound v4;
sound v5;
sound v6;
sound v7;
sound v8;
sound v9;
sound v10;
sound v11;
sound step;
sound start;
sound fon;
sound music;
sound german;
void main()
{
fon.stop();
new.load("Sounds\\new.wav");
zvan.load("Sounds\\zvan.wav");
zvan_ser.load("Sounds\\zvan_ser.wav");
zvan_no.load("Sounds\\zvan_no.wav");
zvan_star_ser.load("Sounds\\zvan_star_ser.wav");
v1.load("Sounds\\v1.wav");
v1.pan = (-30);
v2.load("Sounds\\v2.wav");
v2.pan = (30);
v3.load("Sounds\\v3.wav");
v3.pan = (-30);
v4.load("Sounds\\v4.wav");
v4.pan = (30);
v5.load("Sounds\\v5.wav");
v5.pan = (-30);
v6.load("Sounds\\v6.wav");
v7.load("Sounds\\v7.wav");
v7.pan = (-30);
v8.load("Sounds\\v8.wav");
v9.load("Sounds\\v9.wav");
v9.pan = (30);
v10.load("Sounds\\v10.wav");
v11.load("Sounds\\v11.wav");
v11.pan = (30);
wepo.load("Sounds\\vin.wav");
fon.load("Sounds\\fon.wav");
fon.volume = -10;
step.load("Sounds\\step.wav");
step.volume = 50;
dynamic_menu my_menu;
int menu_result;
show_game_window("Call Of Duty: Blinde");
my_menu.add_item_tts("Start game.");
my_menu.add_item_tts("Exit.");
menu_result=my_menu.run("choose an option.", true);
if(menu_result==-1)
{
alert("Error", "There was an error loading the menu.");
exit();
}
if(menu_result==0)
{
exit();
}
if(menu_result==1)
{
game_play();
}
if(menu_result==2)
{
exit();
}
}
class enemy
{
int hp;
int position;
timer time;
timer enemyy;
int speed;
int ammo = 1000;
enemy()
{
hp = 10;
position = 50;
speed = 300;
}
void move() {
if(time.elapsed>=speed) {
if(position>player_position) position--;
if(position<player_position)
{
position++;
pool.play_1d("sounds/step.wav", player_position, position, false);
}
time.restart();
time.resume();
}
if(absolute(player_position-this.position)<=10 and this.ammo>0) {
if(enemyy.elapsed>1000)
{
wep.play_1d("Sounds/vin.wav", player_position, position, false);
this.ammo--;
player_hp-=10;
enemyy.restart();
}
}
}
void game_play()
{
start.load("Sounds\\start.wav");
start.play_wait();
v1.play_wait();
v2.play_wait();
v3.play_wait();
v4.play_wait();
v5.play_wait();
v6.play_wait();
v7.play_wait();
v8.play_wait();
v9.play_wait();
v10.play_wait();
v11.play_wait();
while(true)
{
fon.play_looped();
if(steper.elapsed>=300)
{
if(key_down(KEY_LEFT))
{
player_position--;
step.play();
}
if(key_down(KEY_RIGHT))
{
player_position++;
step.play();
}
steper.restart();
}
if(player_position<=0)
{
step.stop();
player_position++;
}
if(player_position>board)
{
step.stop();
player_position--;
}
if((player_position>=10)and(not german.playing)and(level==1))
{
int g_rand = random(1, 8);
german.load("Sounds\\german_propaganda"+g_rand+".wav");
german.play();
}
if(key_pressed(KEY_X))
{
exit();
}
if(player_position==50)
{
l2();
}
}
}
void l2()
{
german.stop();
level = 2;
player_position = 1;
position_sound_1d(new, player_position, pposition, 1, 1);
new.play();
while(true)
{
if(steper.elapsed>=300)
{
if(key_down(KEY_LEFT))
{
player_position--;
step.play();
position_sound_1d(new, player_position, pposition, 1, 1);
}
if(key_down(KEY_RIGHT))
{
player_position++;
step.play();
position_sound_1d(new, player_position, pposition, 1, 1);
}
steper.restart();
}
if(player_position<=0)
{
step.stop();
player_position++;
}
if(player_position>board)
{
step.stop();
player_position--;
}
if((key_pressed(KEY_SPACE))and(player_position==5))
{
wepo.play();
rezult = 100;
}
if((key_pressed(KEY_SPACE))and(player_position==4))
{
wepo.play();
rezult = 50;
}
if((key_pressed(KEY_SPACE))and(player_position==6))
{
wepo.play();
rezult = 50;
}
if(key_pressed(KEY_SPACE))
{
wepo.play();
rezult = 10;
}
if((rezult==100)or(rezult==50)or(rezult==10))
{
zvan.play_wait();
}
if(rezult==100)
{
zvan_star_ser.play_wait();
main();
}
if(rezult==50)
{
zvan_ser.play_wait();
main();
}
if(rezult==10)
{
zvan_no.play_wait();
main();
}
if(key_pressed(KEY_X))
{
exit();
}
}
}
}
That's not true, or is it a bug bgt?

2015-03-07 11:27:44

Your code is a mess, my friend.

ReferenceError: Signature is not defined.

2015-03-07 12:14:00

no

2015-03-07 13:02:06

Why would it give an error if it wouldn't be a mess?
If you type like game(); and don't define void game () it will give you that error. Note: I didn't look at the code, I just told you why the error accured.

I post sounds I record to freesound. Click here to visit my freesound page
I usually post game recordings to anyaudio. Click here to visit my anyaudio page

2015-03-07 16:20:06 (edited by stewie 2015-03-07 16:20:49)

Try adding a } before void game_play() { You don't have a closing } for the class, so it's thinking that game_play is part of the enemy class. Forgive me if I'm wrong, but I have limited time to check this. Also I think you don't have the correct number of } on the void_play function.

Deep in the human unconscious is a pervasive need for a logical universe that makes sense. But the real universe is always one step beyond logic.