2019-08-16 02:37:12 (edited by Kitsune 2019-08-16 02:38:10)

so, i'm working on a rpg in bgt, and needs some help.
so, I wanted to fade the storry music using fadepool, but it didnt work.
sekend, I put a wait thing and it tells me something about string.
first ile give you the coad.
#include"m_pro.bgt"
#include"dlgplayer.bgt"
#include"sound_pool.bgt"
#include"dlg.bgt"
#include"fadepool.bgt"
dynamic_menu_pro m;
sound_pool p;
int maxx_health=100;
void main()
{
sound_pool p;
show_game_window("game.storry");
tts_voice voice;
voice.speak_wait("loading");
wait(4);
mainmenu();
}
void setupmenu(bool music=false)
{
m.reset(false);
if(music==true)
{
m.add_music("shootmup.ogg");
}
m.enable_first_letter_navigation=true;
m.click_sound="menuclick.ogg";
m.enter_sound="menuenter.ogg";
m.enable_up_and_down=true;
m.wrap=false;
m.enable_home_and_end=true;
}
void mainmenu()
{
setupmenu(true);
m.add_item_tts("start game","play");
m.add_item_tts("quit","exit");
int mres=m.run("Main menu. Select an option.",true);
if (m.get_item_name(mres)=="play")
{
m.fade_music(20);
dlgplay("shmu.ogg",true,25);
wait(100);
dlgplay("shmu.ogg",true,25);
storry();
}
}
void storry()
{
p.play_stationary("stm.ogg",true);
show_game_window("liveing room");
dlgplay("shmu.ogg",true,25);
dlg("testing, can you here me?");
dlgplay("shmu.ogg",true,25);
dlg("ok. you can");
dlgplay("shmu.ogg",true,25);
dlg("is that sound gonna get anoying?");
dlgplay("shmu.ogg",true,25);
dlg("anyway, wellcom to the world of lonoliark!");
dlgplay("shmu.ogg",true,25);
dlg("let me change that sound for you.");
dlgplay("shmu.ogg",true,25);
wait(5)
dlg(" I couldnt find a sound for you. ile keep looking, though.
dlgplay("shmu.ogg",true,25);
dlg("still injoy");
dlgplay("shmu.ogg",true,25);
mainmenu();
}
and now the problem.
File: C:\Users\user11\Documents\Adel residence\rr_en\packs\template\shoot m up\game.bgt
On line: 66 (18)
Line: dlgplay("shmu.ogg",true,25);
Error: Non-terminated string literal

I am a divine being. I can be called a primordial deity, but that might be pushing it, a smidge. I am the only one of my kind to have ten tails, with others having nine. I don't mean to sound arrogant, but I have ascended my own race.

2019-08-16 02:53:56

Your problem actually has an easy fix. You see, You forgot to put a quote, a right parran and a cemmi after this line.
dlg(" I couldnt find a sound for you. ile keep looking, though.
Btw, this may not be so important to you now but it could be later, but I'd recommend not having so many waits in your scripts. The only times you should need to wait are for a few ms in while loops or when you need to completely pause your script for a sertan amount of time for something. Don't start randomly calling wait all over the place, rather than speed up your code, you will most likely find it slows it down considerably.

2019-08-16 11:47:28

O, ok thanks!

I am a divine being. I can be called a primordial deity, but that might be pushing it, a smidge. I am the only one of my kind to have ten tails, with others having nine. I don't mean to sound arrogant, but I have ascended my own race.

2019-08-16 13:21:40

removed all the waits as it was makeing sapi lag. now its just sound.
lets just say, its a mess.
anyone wanna test?

I am a divine being. I can be called a primordial deity, but that might be pushing it, a smidge. I am the only one of my kind to have ten tails, with others having nine. I don't mean to sound arrogant, but I have ascended my own race.

2019-08-16 14:05:07

Hi, i don't have bgt installed, so i can't test your code. But what i also saw, is that you declared sound_pool multiple times. you should not do that. in the main loop, remove the sound_pool p; and i think that might also help. mind posting your  code here again so that we can see the error?

best regards
never give up on what ever you are doing.

2019-08-16 17:30:52

I need some kinda fadeing method. but here's the coad.
#include"m_pro.bgt"
#include"dlgplayer.bgt"
#include"sound_pool.bgt"
#include"dlg.bgt"
#include"fadepool.bgt"
dynamic_menu_pro m;
sound_pool p;
int maxx_health=100;
void main()
{
show_game_window("game.storry");
tts_voice voice;
voice.speak_wait("loading");
mainmenu();
}
void setupmenu(bool music=false)
{
m.reset(false);
m.enable_first_letter_navigation=true;
m.click_sound="mm.ogg";
m.enter_sound="ms.ogg";
m.enable_up_and_down=true;
m.wrap=true;
m.enable_home_and_end=true;
}
void mainmenu()
{
setupmenu(true);
m.add_item_tts("start game","play");
m.add_item_tts("quit","exit");
int mres=m.run("Main menu. Select an option.",true);
if (m.get_item_name(mres)=="play")
{
storry();
}
}
void storry()
{
p.play_stationary("stm.ogg",true);
show_game_window("liveing room");
dlgplay("shmu.ogg",true,25);
dlg("testing, can you here me?");
dlgplay("shmu.ogg",true,25);
dlg("ok. you can");
dlgplay("shmu.ogg",true,25);
dlg("is that sound gonna get anoying?");
dlgplay("shmu.ogg",true,25);
dlg("anyway, wellcom to the world of lonoliark!");
dlgplay("shmu.ogg",true,25);
dlg("let me change that sound for you.");
dlgplay("shmu.ogg",true,25);
dlg(" I couldnt find a sound for you. ile keep looking, though.");
dlgplay("shmu.ogg",true,25);
dlg("still in joy");
dlgplay("shmu.ogg",true,25);
wait(100);
dlgplay("ringtone.wav",true,25);
dlg("o, its my phone. let me ancer it, hang on");
dlgplay("shmu.ogg",true,25);
dlg("what the? my phone doesnt have a sound!");
dlgplay("shmu.ogg",true,25);
dlg(" what's going on!");
dlgplay("shmu.ogg",true,25);
dlg("you have to help me! I cant do it on my own!");
dlgplay("shmu.ogg",true,25);
qm();
}
void qm()
{
setupmenu(false);
m.add_item_tts("yes, I would like to help you figure out what's going on","y");
m.add_item_tts("zzzzzzzzzzz... a? what's going on, I wasnt lissening, can you repeet?","storry");
m.add_item_tts("no, do it your self, i'm to lazy!","n");
int mres=m.run("will you help me?",true);
if (m.get_item_name(mres)=="y")
{
y();
}
if (m.get_item_name(mres)=="n")
{
n();
}
if (m.get_item_name(mres)=="storry")
{
storry();
}
}
void y()
{
dlgplay("shmu.ogg",true,25);
dlg("thank you so much!");
dlgplay("shmu.ogg",true,25);
dlg("wait. can you here that music?");
dlgplay("shmu.ogg",true,25);
dlg("I can also here it.");
dlgplay("shmu.ogg",true,25);
dlg("can you also here that stupid sound the dev made to move thru text?");
dlgplay("sound.wav",true,25);
dlgplay("shmu.ogg",true,25);
dlg("sorry sorry sorry!");
dlgplay("shmu.ogg",true,25);
dlg("wait. wha? how did that sound just...");
dlgplay("sound.wav",true,25);
dlgplay("shmu.ogg",true,25);
dlg("dev; stop brakeing the forth wall!");
dlgplay("shmu.ogg",true,25);
dlg("mani: sorry sorry sorry! O, my name is mani, by the way.");
}
void n()
{
dlgplay("shmu.ogg",true,25);
dlg("aww come on now, think about it! please?");
qm();
}

I am a divine being. I can be called a primordial deity, but that might be pushing it, a smidge. I am the only one of my kind to have ten tails, with others having nine. I don't mean to sound arrogant, but I have ascended my own race.

2019-08-16 17:45:51

Hi, you might try increasing the fade time from 25 to let's say 70. try that and let me know

best regards
never give up on what ever you are doing.

2019-08-16 20:46:59

that's not the problem. the thing I nwwd is to fade music. if someone ran the coad, you could find out there's no menu music. cause in game there are menus and when ever it goes to a menu it pllayes the menu music.
so I removed it.
ile see if I can zip it for you.

I am a divine being. I can be called a primordial deity, but that might be pushing it, a smidge. I am the only one of my kind to have ten tails, with others having nine. I don't mean to sound arrogant, but I have ascended my own race.

2019-08-17 00:22:38

can I have some mor help?
#include"m_pro.bgt"
#include"dlgplayer.bgt"
#include"sound_pool.bgt"
#include"dlg.bgt"
#include"fadepool.bgt"
dynamic_menu_pro m;
sound_pool p;
int maxx_health=100;
void main()
{
show_game_window("game.storry");
if (key_pressed(KEY_LMENU));
{
mainmenu();
}
}
void setupmenu(bool music=false)
{
m.reset(false);
m.enable_first_letter_navigation=true;
m.click_sound="mm.ogg";
m.enter_sound="ms.ogg";
m.enable_up_and_down=true;
m.wrap=true;
m.enable_home_and_end=true;
}
void mainmenu()
{
setupmenu(true);
m.add_item_tts("start game","play");
m.add_item_tts("about","abg");
m.add_item_tts("quit","exit");
int mres=m.run("Main menu. Select an option.",true);
if (m.get_item_name(mres)=="play")
{
storry();
}
}
void storry()
{
p.play_stationary("stm.ogg",true);
show_game_window("liveing room");
dlgplay("shmu.ogg",true,25);
dlg("testing, can you here me?");
dlgplay("shmu.ogg",true,25);
dlg("ok. you can");
dlgplay("shmu.ogg",true,25);
dlg("is that sound gonna get anoying?");
dlgplay("shmu.ogg",true,25);
dlg("anyway, wellcom to the world of lonoliark!");
dlgplay("shmu.ogg",true,25);
dlg("let me change that sound for you.");
dlgplay("shmu.ogg",true,25);
dlg(" I couldnt find a sound for you. ile keep looking, though.");
dlgplay("shmu.ogg",true,25);
dlg("still in joy");
dlgplay("shmu.ogg",true,25);
wait(100);
dlgplay("ringtone.wav",true,25);
dlg("o, its my phone. let me ancer it, hang on");
dlgplay("shmu.ogg",true,25);
dlg("what the? my phone doesnt have a sound!");
dlgplay("shmu.ogg",true,25);
dlg(" what's going on!");
dlgplay("shmu.ogg",true,25);
dlg("you have to help me! I cant do it on my own!");
dlgplay("shmu.ogg",true,25);
qm();
}
void qm()
{
setupmenu(false);
m.add_item_tts("yes, I would like to help you figure out what's going on","y");
m.add_item_tts("zzzzzzzzzzz... a? what's going on, I wasnt lissening, can you repeet?","storry");
m.add_item_tts("no, do it your self, i'm to lazy!","n");
int mres=m.run("will you help me?",true);
if (m.get_item_name(mres)=="y")
{
y();
}
if (m.get_item_name(mres)=="n")
{
n();
}
if (m.get_item_name(mres)=="storry")
{
storry();
}
}
void y()
{
dlgplay("shmu.ogg",true,25);
dlg("thank you so much!");
dlgplay("shmu.ogg",true,25);
dlg("wait. can you here that music?");
dlgplay("shmu.ogg",true,25);
dlg("I can also here it.");
dlgplay("shmu.ogg",true,25);
dlg("can you also here that stupid sound the dev made to move thru text?");
dlgplay("sound.wav",true,25);
dlgplay("shmu.ogg",true,25);
dlg("sorry sorry sorry!");
dlgplay("shmu.ogg",true,25);
dlg("wait. wha? how did that sound just...");
dlgplay("sound.wav",true,25);
dlgplay("shmu.ogg",true,25);
dlg("dev; stop brakeing the forth wall!");
dlgplay("shmu.ogg",true,25);
dlg("mani: sorry sorry sorry! O, my name is mani, by the way.");
st2();
}
void n()
{
dlgplay("shmu.ogg",true,25);
dlg("aww come on now, think about it! please?");
qm();
}
void st2()
{
dlgplay("shmu.ogg",true,25);
dlg("mani: wait. what's your name?");
dlgplay("shmu.ogg",true,25);
dlg("you :I cant remember");
dlgplay("shmu.ogg",true,25);
dlg("mani: strange.");
dlg("you: I never had a name.");
dlgplay("shmu.ogg",true,25);
dlg("mani: sad *sob *snork. sob, sob, sob.");
dlgplay("shmu.ogg",true,25);
}
and the thing sed if with emty statement

I am a divine being. I can be called a primordial deity, but that might be pushing it, a smidge. I am the only one of my kind to have ten tails, with others having nine. I don't mean to sound arrogant, but I have ascended my own race.

2019-08-17 08:22:13

at adel.spence, i like to test your game

2019-08-17 08:22:59

pleas send it to skipe

2019-08-17 08:24:04

adel.spence, check your PM inbox

2019-08-17 13:05:46

baby, I all ready have you on skype.

I am a divine being. I can be called a primordial deity, but that might be pushing it, a smidge. I am the only one of my kind to have ten tails, with others having nine. I don't mean to sound arrogant, but I have ascended my own race.

2019-08-18 15:19:49

hi. i'm triing to make chek the version number, and if its out of date, it will give you a mesage.
#include"m_pro.bgt"
#include"dlgplayer.bgt"
#include"sound_pool.bgt"
#include"dlg.bgt"
#include"fadepool.bgt"
dynamic_menu_pro m;
sound_pool p;
int maxx_health=100;
string version="0.01";
if(version(=0.00)
dlg("your version is out of date. please download from www.tt-games.freevar.com");
}
void main()
{
show_game_window("audio missing V "+version);
set_sound_storage("sounds.dat");
mainmenu();
}
void setupmenu(bool music=false)
{
m.reset(false);
m.enable_first_letter_navigation=true;
m.click_sound="mm.ogg";
m.enter_sound="ms.ogg";
m.enable_up_and_down=true;
m.wrap=true;
m.enable_home_and_end=true;
}
void mainmenu()
{
setupmenu(true);
m.add_item_tts("start game","play");
m.add_item_tts("about","abg");
m.add_item_tts("quit","exit");
int mres=m.run("Main menu. Select an option.",true);
if (m.get_item_name(mres)=="play")
{
p.play_stationary("stm.ogg",true);
storry();
}
if (m.get_item_name(mres)=="abg")
{
abg();
}
}
void storry()
{
dlgplay("shmu.ogg",true,25);
dlg("testing, can you here me?");
dlgplay("shmu.ogg",true,25);
dlg("ok. you can");
dlgplay("shmu.ogg",true,25);
dlg("is that sound gonna get anoying?");
dlgplay("shmu.ogg",true,25);
dlg("anyway, wellcom to the world of lonoliark!");
dlgplay("shmu.ogg",true,25);
dlg("let me change that sound for you.");
dlgplay("shmu.ogg",true,25);
dlg(" I couldnt find a sound for you. ile keep looking, though.");
dlgplay("shmu.ogg",true,25);
dlg("still in joy");
dlgplay("shmu.ogg",true,25);
wait(100);
dlgplay("ringtone.wav",true,25);
dlg("o, its my phone. let me ancer it, hang on");
dlgplay("shmu.ogg",true,25);
dlg("what the? my phone doesnt have a sound!");
dlgplay("shmu.ogg",true,25);
dlg(" what's going on!");
dlgplay("shmu.ogg",true,25);
dlg("you have to help me! I cant do it on my own!");
dlgplay("shmu.ogg",true,25);
qm();
}
void qm()
{
setupmenu(false);
m.add_item_tts("yes, I would like to help you figure out what's going on","y");
m.add_item_tts("zzzzzzzzzzz... a? what's going on, I wasnt lissening, can you repeet?","storry");
m.add_item_tts("no, do it your self, i'm to lazy!","n");
int mres=m.run("will you help me?",true);
if (m.get_item_name(mres)=="y")
{
y();
}
if (m.get_item_name(mres)=="n")
{
n();
}
if (m.get_item_name(mres)=="storry")
{
storry();
}
}
void y()
{
dlgplay("shmu.ogg",true,25);
dlg("thank you so much!");
dlgplay("shmu.ogg",true,25);
dlg("wait. can you here that music?");
dlgplay("shmu.ogg",true,25);
dlg("I can also here it.");
dlgplay("shmu.ogg",true,25);
dlg("can you also here that stupid sound the dev made to move thru text?");
dlgplay("sound.wav",true,25);
dlgplay("shmu.ogg",true,25);
dlg("sorry sorry sorry!");
dlgplay("shmu.ogg",true,25);
dlg("wait. wha? how did that sound just...");
dlgplay("sound.wav",true,25);
dlgplay("shmu.ogg",true,25);
dlg("dev; stop brakeing the forth wall!");
dlgplay("shmu.ogg",true,25);
dlg("mani: sorry sorry sorry! O, my name is mani, by the way.");
st2();
}
void n()
{
dlgplay("shmu.ogg",true,25);
dlg("aww come on now, think about it! please?");
qm();
}
void st2()
{
dlgplay("shmu.ogg",true,25);
dlg("mani: wait. what's your name?");
dlgplay("shmu.ogg",true,25);
dlg("you :I cant remember");
dlgplay("shmu.ogg",true,25);
dlg("mani: strange.");
dlgplay("shmu.ogg",true,25);
dlg("you: I never had a name.");
dlgplay("shmu.ogg",true,25);
dlg("mani: sad *sob *snork. sob, sob, sob.");
dlgplay("shmu.ogg",true,25);
}
void abg()
{
dlgplay("shmu.ogg",true,25);
dlg("audio missing is an audio game created by adel spence in 2019.");
mainmenu();
}
what am I doing rong?

I am a divine being. I can be called a primordial deity, but that might be pushing it, a smidge. I am the only one of my kind to have ten tails, with others having nine. I don't mean to sound arrogant, but I have ascended my own race.

2019-08-18 15:40:15

One thing that hasn't been mentioned here yet is your missing a few scripts for dynamic menu pro.bgt. You also need keyhold.bgt, and speech.bgt.

2019-08-18 15:42:19

You don't need a right brace at the end of your variables before your main function.

2019-08-18 16:49:32

its not a variable, its a if statement

I am a divine being. I can be called a primordial deity, but that might be pushing it, a smidge. I am the only one of my kind to have ten tails, with others having nine. I don't mean to sound arrogant, but I have ascended my own race.

2019-08-18 16:49:54

and I doen't need m.

I am a divine being. I can be called a primordial deity, but that might be pushing it, a smidge. I am the only one of my kind to have ten tails, with others having nine. I don't mean to sound arrogant, but I have ascended my own race.

2019-08-19 00:02:24

Hi,
What i'm reading here has several syntax errors.
First, You wouldn't put any If/else (Conditional) statements outside any functions/class constructors.
Second, You wouldn't put a semicolon (;) after an if/else (conditional statements/functions.
Third, Studying BGT syntax helps you get a grip of the language, But is not enough.
Keep in mind, When i say "studying", I'm refering to careful studying/practicing what you've learnt so far.
Anyways. Watch out for the syntax errors and try to memorize which compylation error means what.
For instance, If you put an if/else (conditional) statement outside a function/class constructor You'll get

Error: Unexpected token 'if'

It means you have your statement in a wrong place; Somewhere it shouldn't be.
Browsing your compylation errors helps you understand "where" you're getting "which" errors, So don't underestimate them.

Co-founder of Sonorous Arts.
Check out Sonorous Arts on GitHub: https://github.com/sonorous-arts/

2019-08-19 00:04:59

thanks for the tip, @19
I fixed it, kindof

I am a divine being. I can be called a primordial deity, but that might be pushing it, a smidge. I am the only one of my kind to have ten tails, with others having nine. I don't mean to sound arrogant, but I have ascended my own race.

2019-08-19 07:29:48

help again. this time, its not the coad. I want make the game play a mesage from my ftp server. can I do that and how?

I am a divine being. I can be called a primordial deity, but that might be pushing it, a smidge. I am the only one of my kind to have ten tails, with others having nine. I don't mean to sound arrogant, but I have ascended my own race.

2019-08-19 14:09:40

You could always use something like terlark to upload and download files to and from your ftp server, or simply put the files on your website and have the game download and play them. Modifying the dl_file script to remove the progress beeps and everything shouldn't be difficult, so depending on how big the files are the user may not even realise something is being downloaded. Of corse this system has the problem of what happens when your website goes down, so I'd recommend not keeping anything game changing on there.

2019-08-21 00:01:53

my friend did something and doen't know how to fix.
help?
if (version<=0.01)
{
dlg("your version is out of date. please download from www.tt-games.freevar.com");})
}
if (version>=0.01)
{
dlg("Good. You have the correct version");
}
mainmenu();
}

I am a divine being. I can be called a primordial deity, but that might be pushing it, a smidge. I am the only one of my kind to have ten tails, with others having nine. I don't mean to sound arrogant, but I have ascended my own race.

2019-08-21 00:15:10

And what is the problem, exactly?
What is that dlg thing? I know that is no bgt built-in object and you didn't declare it anywhere.

2019-08-21 02:52:06

Hi,
As i stated before, You're going the wrong path asking people to see what's wrong with your code.
You may have some cool people helping you out and correcting your code in some points, But you'll be always needing such cool people because you haven't practiced/learnt the language syntax well enough.
So for your own sake, I refer you to BGT language syntax tutorial, again.
Putting my previous advice aside, With you copying/pasting only a portion of your code in here, There's always a chance of making mistakes interpreting it.
For instance:

if (version<=0.01)

if (version>=0.01)

I can't firmly say that these two if statements share a common block of code.
Although i can logically say because of the two statements being a comparison of a single variable that these might actually share a common block of code, But i really can't be sure what you exactly and precisely wanted to achieve.
Anyways. What i read here is two extra signs after your dlg function call that probably are your main problem in here:

dlg("your version is out of date. please download from www.tt-games.freevar.com");})

If i interpreted your code correctly, The last Right Brace and right paren are the problems i see in this code.
But again, After the second if statement block, There's a call to a mainmenu function ann then another Right Brace which puts me in doubt about your code blocks and makes me wonder if you haven't coppied/pasted your code correctly from a right place or if i misinterpreted it by any chance.
Hope it helps in any case.

Co-founder of Sonorous Arts.
Check out Sonorous Arts on GitHub: https://github.com/sonorous-arts/