View Single Post
Old February 19, 2009, 15:18   #5
takkaria
Veteran
 
takkaria's Avatar
 
Join Date: Apr 2007
Posts: 1,941
Donated: $40
takkaria is on a distinguished road
Quote:
Originally Posted by PaulBlay View Post
Well, I got close this time, but it looks like no cigar for me.

I thought I'd added everything I needed for an extra parameter in the monster text, but now it is no longer recognizing the D: line! (Which I don't think I've touched)

Error at line 121 of 'monster.txt'.
Record 1 contains a 'undefined directive' error.
Parsing 'D:He looks squalid and thoroughly revolting.'.


Code:
	/* Process 'D' for "Description" */
	if (buf[0] == 'D')
	{
		/* Store the text */
		if (!add_text(&(r_ptr->text), head, buf+2))
			return (PARSE_ERROR_OUT_OF_MEMORY);
	}

	/* Process 'T' for "Talk" */ 
	if (buf[0] == 'T')
	{
		/* Store the line of speech */
		if (!add_text(&(r_ptr->talk), head, buf+2)) 
			return (PARSE_ERROR_OUT_OF_MEMORY);
	}
Oh well, better luck next scheme.
That second 'if' should be 'else if'. Follow through the code and you'll see why.
__________________
takkaria whispers something about options. -more-
takkaria is offline   Reply With Quote