Page 1 of 1

[g3.8pre-757-g0ed847b51]Dialog Pagenames as String fails

Posted: Sat Apr 06, 2019 5:32 am
by Zergeant
Using the pagename property as a string instead of number, it doesn't go to the next page properly, I've double-checked the names and it will either spit out an invalid node xx error in the console or it will go to a completely unrelated page. Number of pages have been cut down in order to debug easier.

Code: Select all

conversation
{
	// A hotheaded boy with a story to tell.
	actor = "Archvile";
	
	// Intro
	page
	{
		name = "Hothead";
		pagename = "Hello";
		dialog = "I got a burning feelin'!";
		choice
		{
			text = "Really now?";
			nextpage = "MyFeels";
		}
	}
	
	// Second page
	page
	{
		name = "Hothead";
		pagename = "MyFeels";
		dialog = "Yeah... My fiancee just left me...";
		choice
		{
			text = "Sorry to hear...";
			nextpage = "Japed";
		}
	}
	
	// Third page
	page
	{
		name = "Hothead";
		pagename = "Japed";
		dialog = "That's okay, we weren't doing too hot anyway! Har har har!";
		choice
		{
			text = "I ought to shoot you for that pun...";
			nextpage = "Hello";
		}
	}
}
This will result in an invalid node 11 not found error, running on g3.8pre-757-g0ed847b51.

Re: [g3.8pre-757-g0ed847b51]Dialog Pagenames as String fails

Posted: Thu Apr 25, 2019 12:25 pm
by Rachael
Huh. As far as I can recall, no one poked me about this, and this is a little important. I don't have time to look into it today - but I am bumping this as a reminder to myself to look into this.

Re: [g3.8pre-757-g0ed847b51]Dialog Pagenames as String fails

Posted: Thu Apr 25, 2019 3:16 pm
by Nash
Sorry, I thought you'd already seen it. :) Yeah I was about to ask you about this issue recently but figured you had other things going on.

Re: [g3.8pre-757-g0ed847b51]Dialog Pagenames as String fails

Posted: Wed May 22, 2019 1:13 pm
by Rachael
The point of failure seems to be here:

https://github.com/coelckers/gzdoom/blo ... f.cpp#L602

But I can't for the life of me figure out what's wrong with this statement. I sent Graf a PM to see if he has any idea but he might be busy. If anyone else has any clue what's happening here, I'm all ears.

This uses a hash table TArray.

Re: [g3.8pre-757-g0ed847b51]Dialog Pagenames as String fails

Posted: Sat May 25, 2019 8:20 am
by _mental_
There is nothing wrong with that line. The problem is in indexing of pages by names.
Numerical index refers the next page relatively to the root of conversation. Names are converted to absolute indices counted from zero.

Re: [g3.8pre-757-g0ed847b51]Dialog Pagenames as String fails

Posted: Sat May 25, 2019 11:08 am
by Rachael
Ugh. :|

Okay, I see.

Re: [g3.8pre-757-g0ed847b51]Dialog Pagenames as String fails

Posted: Sun May 26, 2019 6:47 am
by _mental_
Fixed in a54bc61.

Re: [g3.8pre-757-g0ed847b51]Dialog Pagenames as String fails

Posted: Sun May 26, 2019 10:50 am
by Rachael
Thank you, _mental_. :)