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

Error message

Deprecated function: implode(): Passing glue string after array is deprecated. Swap the parameters in drupal_get_feeds() (line 394 of /var/www/pied-piper.ermarian.net/includes/common.inc).
AuthorTopic: Check Dlg. Script For Bugs (esp. "line 67")
Warrior
Member # 1250
Profile #0
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.
Posts: 93 | Registered: Saturday, June 1 2002 07:00
Agent
Member # 4506
Profile Homepage #1
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!

--------------------
"You dare Trifle with Avernum?" ~ Erika the Archmage
--------------------
My Scenarios:
Undead Valley : A small Undead problem, what could possibly go wrong?
--------------------
Richard Black - PROOF of his existance (the Infernal one's website).
--------------------
MY FORUM! Randomosity at it's highest! :)
Posts: 1370 | Registered: Thursday, June 10 2004 07:00
Agent
Member # 4506
Profile Homepage #2
All you have to do is swap the ACTIONS for codes and add Break; at the end of each chuck of code.

- Archmagi Micael

EDIT = OOPS! Double Post - SORRY!!!!!!!!!!!!!!

[ Saturday, July 31, 2004 12:39: Message edited by: Archmagi Micael ]

--------------------
"You dare Trifle with Avernum?" ~ Erika the Archmage
--------------------
My Scenarios:
Undead Valley : A small Undead problem, what could possibly go wrong?
--------------------
Richard Black - PROOF of his existance (the Infernal one's website).
--------------------
MY FORUM! Randomosity at it's highest! :)
Posts: 1370 | Registered: Thursday, June 10 2004 07:00
Warrior
Member # 1250
Profile #3
Thanks... I still feel like an idiot, doing this stuff by looking at examples and then trying to modify them for my own purposes. But I guess it's better than nothing...
Posts: 93 | Registered: Saturday, June 1 2002 07:00