2014-07-28 01:47:50

hello,
my brother and I are working on a game called dungeon quest. Unfortunatly, we hit a road block as blast buddy seams to have decided to destroy crucial parts of the source code, thus leading to some rather nasty compiler errors.
I keep getting stuff about either unexpected end of file, unexpected token, or the dreaded "else needs expression" (that is the thing that's been annoying me lately).
I need some help with this so I can crank out a beta version and hire beta testers.
I do not want to make the mistake of sending them a game that doesn't work at all.

be a hero and stop Coppa now!
https://docs.google.com/document/d/1Dkm … DkWZ8/edit
-id software, 1995

2014-07-28 02:15:22

The fix can range from "add in some missing braces" to "you're screwed".  Since this was intentional, I can say with 99% certainty it's the latter.  Unless you are very familiar with the code, you will not be able to restore it if huge chunks go missing; it is very doubtful that anyone else can.  The only "fix" for this is to have procedures in place: a version control system prevents accidents and a frequent backup policy, especially to a server that only someone very trusted has access to, prevents malice.  A distributed version control system (either Git or Mercurial) can also help because, if someone goes far enough to wreck histories, someone else probably has an offline copy.  But as for recovering or fixing what you have, unless you're very lucky and it's just some missing braces? it may honestly be better to restart from scratch.
Sorry that I can't give better news.  This is a serious thing.  If you did it at a job and went far enough to actually, truly destroy something (companies typically have the stuff I mentioned in place), your career and future life without massive legal proceedings would be over.  The company for which you worked would probably also be ruined for the simple reason that meeting deadlines on their products would have, overnight, become almost laws-of-physics impossible.

My Blog
Twitter: @ajhicks1992

2014-07-28 02:34:12

I have to agree with Camlorn on this subject. If someone intentionally destroyed or removed certain pieces of code it could be anything from a few missing braces to something more severe like missing functions. Its impossible to say without examining the code first-hand, but you could very well be screwed. A more detailed look at the compilation errors would help here.

Sincerely,
Thomas Ward
USA Games Interactive
http://www.usagamesinteractive.com

2014-07-28 04:54:20

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)

be a hero and stop Coppa now!
https://docs.google.com/document/d/1Dkm … DkWZ8/edit
-id software, 1995

2014-07-28 15:04:14

Well, I see one obvious error in your code other than what the compile error said. After you show your first alert box you have a left brace just before the first dynamic_menu. It's the same function, so you don't need one. Fix that error in line 74 also.

I like to sleep, Sleep is good,
This is how I do it: Lie on a nice warm cozy bed, and dream dreams about how to rule the world!
Follow @TheGreatAthlon5 on twitter for humorous facts and game updates!
If you like my posts, thumb me up!

2014-07-28 16:49:03

my brother told me that but I didn't listen.

be a hero and stop Coppa now!
https://docs.google.com/document/d/1Dkm … DkWZ8/edit
-id software, 1995

2014-07-28 17:07:35

here is the new compiler error. you will notice the error in line 74 is delt with.
File: C:\dungeon quest\dungeon quest.bgt
On line: 103 (27)
Line: wakeup.add_item_tts("I don't know");
Error: Non-terminated string literal

be a hero and stop Coppa now!
https://docs.google.com/document/d/1Dkm … DkWZ8/edit
-id software, 1995

2014-07-28 18:17:02

Hi,
From viewing that sourcecode, I can come to 2 conclusions.
1. Whoever has done this obviously has a little programming knowledge.
2. You are, unless you know where the function statements, etc should go, screwed.

Underworld Tech.
Accessibility from us, to you.
Visit us

2014-07-28 22:42:11

This error is actually sort of counterintuitive. The problem is the apostrophe, which BGT mistook for another quote. You need to escape it with the \ character so that BGT treats it as a normal apostrophe character, E.G.
wakeup.add_item_tts("I don\'t know");

I like to sleep, Sleep is good,
This is how I do it: Lie on a nice warm cozy bed, and dream dreams about how to rule the world!
Follow @TheGreatAthlon5 on twitter for humorous facts and game updates!
If you like my posts, thumb me up!

2014-07-29 05:02:09

That's not the problem. Generally if you use characters such as a double quote, characters of a different quote won't terminate the string.

I don't think your screwed in any particular way. there isn't really much code here.

I'll mention the errors I found:

As mentioned before there are a few left braces where they don't need to be.

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!!");

There needs to be a first set of quotes then a comma for parameters.

Also the game's text is kind of unprofessional as of now, maybe it should be updated. Unless it fits into some rpg theme.


Some notes on the code itself:
The code as of now is incredibly hard to read.
As of now you have each menu nested within braces. It would be easier to give them each own function, or set up a function that will show dialogs.

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.

2014-07-29 06:38:25

the reason is that the game is supposed to be an adventure game (I know, not a whise choice for a first game). it was my brother's idea. (he's known as silverspadeace on this forum) I should maybe begin doing some more simple games first.

be a hero and stop Coppa now!
https://docs.google.com/document/d/1Dkm … DkWZ8/edit
-id software, 1995

2014-07-31 08:48:55 (edited by sunnyadam 2014-08-04 08:10:36)

t all started with LOGO.  If you don't remember making this little turtle crawl around and draw stuff, then your childhood wasn't complete.  In fact, you should probably go back and do it now.
Seymour Papert, a researcher at MIT, reasoned that children could learn programming more easily if they were given a fun programming environment to play around in.  This was so successful in the case studies he observed that he was forced to develop an explanation.  He called his theory of learning 'constructionism' (because the student can construct their own knowledge by experiment).  This spawned a genre of software toys designed to teach programming (all after my time, unfortunately).  Toys like Alice, Greenfoot, RoboMind, GameStar Mechanic (my favorite), and Scratch (the most popular).  Even Lego's robotics platform, Lego Mindstorms is an extension of the ideas Papert outlines in his books 'Mindstorms' and 'The Children's Machine' and is perhaps the most faithful to them. here are some info Amazing Race Team Building

These efforts have engaged millions of students in learning about technology, and has given them great early exposure to the field.  In my own first grade class, we had a teacher (I think his name was Mr. Costa) who took care of the computer lab and taught computer class.  We were taught the basics of LOGO, and then asked to produce a project of our choosing.  My partner and I worked diligently to put together an animated scene of an F1 racetrack, complete with cheering fans and cars circling the track.

2014-07-31 12:12:26

That's 1 odd spambot. It didn't have any links. The post was actually kidn of interesting.

I like to sleep, Sleep is good,
This is how I do it: Lie on a nice warm cozy bed, and dream dreams about how to rule the world!
Follow @TheGreatAthlon5 on twitter for humorous facts and game updates!
If you like my posts, thumb me up!

2014-07-31 20:31:03

he's not a spambot, he was talking about his early exposure to programming. there needs to be a bgt remake of it.

be a hero and stop Coppa now!
https://docs.google.com/document/d/1Dkm … DkWZ8/edit
-id software, 1995