Sigh, never try to debug other people's code (although that's a large part of what I do for a living, but that's another story...).
The code I'm having problems with has a dialog that contains a "new-room" function. In the room_AfterFadeIn() function for the room that the character goes to there are five calls to dialog[xx].Start(), each followed by the animation of two NPCs:
[code]
function room_AfterFadeIn()
{
dialog[26].Start();
character[35].LockView(76);
character[35].Animate(0, 5, eOnce, eBlock);
character[35].UnlockView();
character[34].LockView(77);
character[34].Animate(0, 3, eOnce, eBlock);
character[34].UnlockView();
dialog[27].Start();
// snip
character[35].Say("says something here");
character[0].ChangeRoom(12,170,180); // this is the PC
character[34].ChangeRoom(-1,100,100);
Wait(100);
character[0].Say("something else here");
}
[/code]
The final part of the code is intended to move both NPCs out of the room and to move the PC back to the room he was in when the original dialog started.
To sum up, we have a call from a dialog to change room, run several dialogs and then change back to the room we started from.
What happens is that the game changes to the new room and the animation runs several times, but the dialogs do not start up. Then the command to move the PC back to the original room causes the following crash: "Error: NewRoom: Cannot queue action, post-script queue full".
What should happen, fairly obviously, is that the the first dialog playes, then when the appropriate topic is chosen, the game changes to the new room, we see the dialogs, the animations run in between them and then the player gets moved back to the original room.
It looks like this code has got itself a bit tied up in knots and a script is not returning in time for something else to happen, or something like that.
Can anyone suggest how to fix this? I'm using v3.0.0.23. Thanks very much.