Dialogue problem

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: Dialogue problem
Master
Member # 5977
Profile Homepage #0
Fort some reason, no text is displayed, except for the questions, in the following dialogue node:

begintalknode 1;
state = -1;
personality = 9;
nextstate = 1;
condition = 1;
question = "Fersor";
text1 = "Fersor, mighty chieftain of Hirpirdihra, is sitting in front of you on an old, wooden chair. He seems tired of life and he looks at you with begging eyes. He speaks:";
text2 = "Adventurers. Have you thought about my question? have you thought about any consequences: for us and for you? We know you serve a nation, we know you can't just help the enemy. Still, we ask this of you. What is the answer?";
text3 = "You walk towards Fersor, who is very glad to see you. He is thrilled you are willing to help him and his folk out of Avernum, out of the pit you want to get out of too.";
text4 = "_What are you doing here!_ Fersor immediatly stands up and asks you to leave. You refuse, but he even gets angrier. You are soon standing out side of the palace.";
text5 = "";
text6 = "";
text7 = "";
text8 = "";
code =
if ((get_flag(250,0) == 0) && (get_flag(4,2) == 0)) { // intro - not answered question yet
remove_string(3);
remove_string(4);
remove_string(5);
remove_string(6);
remove_string(7);
remove_string(8);
}

if ((get_flag(250,0) == 0) && (get_flag(4,2) == 1)) { // intro - said yes
remove_string(1);
remove_string(2);
remove_string(4);
remove_string(5);
remove_string(6);
remove_string(7);
remove_string(8);
}

if ((get_flag(250,0) == 0) && (get_flag(4,2) == 2)) { // intro - said no
remove_string(1);
remove_string(2);
remove_string(3);
remove_string(5);
remove_string(6);
remove_string(7);
remove_string(8);

relocate_character(0,28,10);
relocate_character(1,27,10);
relocate_character(2,26,10);
relocate_character(3,25,10);

end();
}
break;
I couldn't spot anything in the flags that might make it so that all if statements are triggered and all lines are removed. I wondered if one of you could find out what the problem is? The problem doesn't arise in any other dialogue node of this same script I made.

--------------------
Play and rate my scenarios:

Where the rivers meet
View my upcoming scenario: The Nephil Search: Escape.

Give us your drek!
Posts: 3029 | Registered: Saturday, June 18 2005 07:00
Infiltrator
Member # 5576
Profile Homepage #1
So far I haven't been able to see what the problem is, but you could simplify your code a great deal by removing text5-text8 if you're not using them, and also the the calls to remove them from each of the if statements.
Also, you should use teleport_party to kick the party out of the palace.
To find out more about what's happening, you might toss some print statements into the code section to find out what the flags are really set to, and which parts of the code are really running.

--------------------
Überraschung des Dosenöffners!
"On guard, you musty sofa!"
Posts: 627 | Registered: Monday, March 7 2005 08:00
Master
Member # 5977
Profile Homepage #2
Text 5-8 will eventually be used for the second language, so they are there with a reason. I checked again, and all flags are set as they should be at that point. I guess I'll check again.

Teleport party does have a sound, though, doesn't it? I think you can activate or deactivate the effect, but can you get rid of the sound accompanying it too? If not, then I don't think it would be of use.

--------------------
Play and rate my scenarios:

Where the rivers meet
View my upcoming scenario: The Nephil Search: Escape.

Give us your drek!
Posts: 3029 | Registered: Saturday, June 18 2005 07:00
Shaper
Member # 7472
Profile Homepage #3
You could also make it simpler using the clear_strings() call, and then using add_string() to add only the strings you need.

--------------------
I tried to think of something witty to put here.

Needless to say, I failed.
Posts: 2686 | Registered: Friday, September 8 2006 07:00
Master
Member # 5977
Profile Homepage #4
I could have, and I appreciate the comments, but the question still isn't solved. So is there anybody who could see a reason for the dialogue not to work?

--------------------
Play and rate my scenarios:

Where the rivers meet
View my upcoming scenario: The Nephil Search: Escape.

Give us your drek!
Posts: 3029 | Registered: Saturday, June 18 2005 07:00
Lifecrafter
Member # 6193
Profile Homepage #5
As Niemand said, put a print_str in each block of code, and see if all of them are getting called (which is probably what's happening.) If it is, then it's a flag problem.

--------------------
Guaranteed to blow your mind.

Frostbite: Get It While It's...... Hot?
Posts: 900 | Registered: Monday, August 8 2005 07:00
Infiltrator
Member # 5576
Profile Homepage #6
quote:
Teleport party does have a sound, though, doesn't it? I think you can activate or deactivate the effect, but can you get rid of the sound accompanying it too?
You can turn off the sound. Besides, relocating each party member will not work, the party is still considered by the game to be in the same location, so as soon as the player moves, the party will step back where it was before. teleport_party solves this problem.

--------------------
Überraschung des Dosenöffners!
"On guard, you musty sofa!"
Posts: 627 | Registered: Monday, March 7 2005 08:00
Master
Member # 5977
Profile Homepage #7
No, it works correctly with relocate_character. It worked when I was aphatesting things a bit. The problem you described did occur with march_party, though, when I tried that call in WtRM for doing something similair.

--------------------
Play and rate my scenarios:

Where the rivers meet
View my upcoming scenario: The Nephil Search: Escape.

Give us your drek!
Posts: 3029 | Registered: Saturday, June 18 2005 07:00
Shaper
Member # 3442
Profile Homepage #8
relocate_character and march_party need a block_entry(1) call to make sure that the party doesn't get sent back to wherever they started from. Setting the view to the right place helps too...

As for the coding, I can't see any issues... Umm...

--------------------
And when you want to Live
How do you start?
Where do you go?
Who do you need to know?


*Name by Slarty
Posts: 2864 | Registered: Monday, September 8 2003 07:00