Jump to content

Check Dlg. Script For Bugs (esp. "line 67")


Recommended Posts

Dialogue script for my first self-scripted town. Keep getting error message: "Missing semicolon in line 67." I used Programmer's Notebook to jump to line 67, but there are no errors. I'd guess that the problem is more around command begintalknode 4 & 5, since those are commands that are new to me, which I've just tried this once.

 

begintalkscript;

 

variables;

 

body;

 

begintalknode 1;

state = -1;

personality = 0;

nextstate = 2;

question = "Captain Jenkins";

text1 = "Before you stands a tall, dashing man in military dress. He gazes out on the harsh desert. When you enter, he says, _Hello, adventurers. What do you want?_";

 

begintalknode 2;

state = 2;

personality = 0;

nextstate = 3;

question = "What is this place?";

text1 = "_This is Expoville. It's an experimental town, full of crazy stuff. Just look around. Crazy stuff. Yup. There it is._";

 

begintalknode 3;

state = 3;

personality = 0;

nextstate = -1;

question = "Oh, I see, then.";

text1 = "Captain Jenkins continues to fix his intense gaze on you, waiting for you to do or say something. Even if it's leaving his building.";

 

begintalknode 4;

state = 2;

personality = 0;

nextstate = -1;

question = "Do you have any quests that I can do?";

text1 = "_Yes. Go talk to the dog._";

action = toggle_quest(0,1);

 

begintalknode 5;

state = 2;

personality = 0;

nextstate = -1;

condition = get_flag(0,1) == 1;

question = "I talked to the dog.";

text1 = "Good work! You get no experience, or gold.";

text2 = "But you have programmed well, and I am printing a little message in the box below.";

action = {toggle_quest(0,0);

print_str("You completed your first quest!");

print_str("Good programming!");

}

 

begintalknode 6;

state = 10;

personality = 1;

nextstate = 11;

question = "Starvin' Marvin";

text1 = "A ragged, crazy-looking man is hiding back here.";

 

begintalknode 7;

state = 11;

personality = 1;

nextstate = 12;

question = "How did you get back here?";

text1 = "_How did *you* get back here?_";

 

begintalknode 8;

state = 11;

personality = 1;

nextstate = 13;

question = "Are you hungry?";

text1 = "_You bet!_";

 

begintalknode 9;

state = 12;

personality = 1;

nextstate = -1;

question = "Stare him down.";

text1 = "Starvin' Marvin stares right back at you.";

 

begintalknode 10;

state = 13;

personality = 1;

nextstate = -1;

question = "I don't have any food.";

text1 = "Marvin looks dejected, and goes back to sitting on his sleeping pad, muttering to himself.";

 

begintalknode 11;

state = 20;

personality = 2;

question = "Dog";

text1 = "The dog looks at you.";

action = {set_flag(0,1,1);

play_sound(173);

}

 

begintalknode 12;

state = 30;

personality = 3;

question = "Cow";

text1 = "The cow looks at you... and licks its lips!";

action = play_sound(172);

 

A last note--unless you find something horribly wrong with my script, I'd rather bumble through this myself, to figure out all the optimizing points, et cetera. In other words, I'd appreciate it if nobody tried to completely re-script this for me.

Link to comment
Share on other sites

Quote:
Originally written by Guardian of Eternity:

begintalknode 4;
state = 2;
personality = 0;
nextstate = -1;
question = "Do you have any quests that I can do?";
text1 = "_Yes. Go talk to the dog._";
action = toggle_quest(0,1);

THAT's YOUR PROBLEM. IT SHOULD SAY 'CODE' INSTEAD OF 'ACTION', AND THERE SHOULD BE A: Break; AFTER IT!
begintalknode 5;
state = 2;
personality = 0;
nextstate = -1;
condition = get_flag(0,1) == 1;
question = "I talked to the dog.";
text1 = "Good work! You get no experience, or gold.";
text2 = "But you have programmed well, and I am printing a little message in the box below.";
action = {toggle_quest(0,0);
print_str("You completed your first quest!");
print_str("Good programming!");
}

action = {set_flag(0,1,1);
play_sound(173);
}

begintalknode 12;
state = 30;
personality = 3;
question = "Cow";
text1 = "The cow looks at you... and licks its lips!";
action = play_sound(172);

A last note--unless you find something horribly wrong with my script, I'd rather bumble through this myself, to figure out all the optimizing points, et cetera. In other words, I'd appreciate it if nobody tried to completely re-script this for me.
It's all of your ACTIONS in stead of CODES;

THAT's YOUR PROBLEM. IT SHOULD SAY 'CODE' INSTEAD OF 'ACTION', AND THERE SHOULD BE A: Break; AFTER IT!
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...