Getting two warnings on TADS3 compile

Does anyone have any ideas as to what is causing these two warnings :question:

        else if ('copyright'.startsWith(kw))
        {
            /* show the copyright/license information */
            versionInfo.showCopyright();
        }

"\bThe Magic Forest
\nRelease <<versionInfo.version>> (<<versionInfo.serialNum>>)
\nCopyright ©2004, 2006 Michael J.\ Roberts
/ Freeware / Type <<aHref(‘copyright’, ‘COPYRIGHT’)>> for details\n

Tip: you can go to the source location of a compile error
by double-clicking on the error message in this window

----- begin build: Tue Dec 13 17:05:23 2011 -----

t3make -Fy “C:\Documents and Settings\Frenchy\Desktop\The Magic Forest\obj” -Fo “C:\Documents and Settings\Frenchy\Desktop\The Magic Forest\obj” -o “debug\The Magic Forest.t3” -a -D “LANGUAGE=en_us” -D “MESSAGESTYLE=neu” -v -d -statprefix <@> “system.tl” “adv3\adv3.tl” “The Magic Forest.t” -res “GameInfo.txt”
TADS Compiler 3.0.18.1 Copyright 1999, 2007 Michael J. Roberts
The Magic Forest.t(243): warning:
The symbol “serialNum” is undefined, but appears from context to be a property
name. The compiler is assuming that this is a property. Check the spelling of
the symbol. If this assumption is correct, you can avoid this warning by
explicitly declaring a value to the property in an object definition rather
than in method code.

The Magic Forest.t(352): warning:
The symbol “showCopyright” is undefined, but appears from context to be a
property name. The compiler is assuming that this is a property. Check the
spelling of the symbol. If this assumption is correct, you can avoid this
warning by explicitly declaring a value to the property in an object definition
rather than in method code.

Errors: 0
Warnings: 2

Build successfully completed.
----- end build: Tue Dec 13 17:05:29 2011 -----

Looks like you also need the serialNum property and the showCopyright method from the versionInfo object in about.t. (Part of the Return to Ditch Day source archive.)

I haven’t seen those verbose compiler warnings before. They remind me a lot of Inform 7’s messages.

Thanks again for the help. I hate to sound ignorant about all this stuff but I should make it known the I have Dementia which is a short term memory loss. I have to read the TADS manuals many, many times because I forget what I have learned in the recent past. However, I am slowly remembering the things that I have repeatly read.

Having said this, I am asking how I can recognise both the serialNum property and the showCopyright method that, indeed, are from RTDD. I am using RTDD as well as the manuals to learn the basics of TADS. Some of the applications I’m writing are no doubt advanced for me at this point but I’m attempting to write my game source in a linear fashion so that I have a better feel about how everything interconnects.

Thanks and please bear with me. :smiley:

RonG

You can fix the compiler warnings by adding those properties / methods to your versionInfo object, or by putting this code somewhere:

modify versionInfo
    serialNum = 12345678

    showCopyright()
    {
        "Blah blah blah. ";
    }
;

If you’re asking how do you tell that serialNum and showCopyright are custom properties, the general approach is to go to the Library Reference, click on All Symbols in the upper left, and then search for those by name.

In this case they aren’t listed, which means they aren’t part of adv3, which in turn means that they must be defined in the source code for the game you’re pulling the example code from.

Figuring out exactly where is a job for your tools. Workbench has a Project > Find in Project Files command which is ideal for this sort of thing. (For that matter, it will find the adv3 symbols, but often these are defined and redefined in several places, and it’s easier to use the Library Reference to decide which definition is relevant.)

If you haven’t done so already, you may want to set up RtDD as its own project in Workbench, so you can easily switch to it and search the code when you run into situations like this.

I included the short piece of code that you provided and when I compile the game this new piece of code produces an error. I have attached that error. I have also attached the two sections of code that I believe are causing my problems. I also tried the other suggestions that you provided. I searched all around the manuals, RTDD, and my code and couldn’t find anything helpful.

By the way, I no longer get the two compile warnings that I got before. I have included the error from your code first and then the two sections of code. Any ideas :question:

RonG

New code you supplied:

----- begin build: Thu Dec 15 12:19:06 2011 -----

t3make -Fy “C:\Documents and Settings\Frenchy\Desktop\The Magic Forest\obj” -Fo
“C:\Documents and Settings\Frenchy\Desktop\The Magic Forest\obj” -o “debug\The
Magic Forest.t3” -a -D “LANGUAGE=en_us” -D “MESSAGESTYLE=neu” -v -d -statprefix
<@> “system.tl” “adv3\adv3.tl” “The Magic Forest.t” -res “GameInfo.txt”

TADS Compiler 3.0.18.1 Copyright 1999, 2007 Michael J. Roberts
The Magic Forest.t(110): error:
The object “versionInfo” is already defined earlier in the program. Each
object must have a unique name. Remove the redundant definition or change the
name of one of the objects.

Errors: 1
Warnings: 0

t3make: error code 1

Build failed.
----- end build: Thu Dec 15 12:19:08 2011 -----

First section:


/*******************************************************************************

  • Game credits and version information. *
    *******************************************************************************/

versionInfo: GameID
IFID = ‘196fcc08-7a97-c389-9f06-5e7d3106fc33’
name = ‘The Magic Forest’
byline = ‘by Ron Gaudet’
htmlByline = ‘by
Ron Gaudet

version = ‘1’
authorEmail = ‘Ron Gaudet rgaudet1938@buckeye-access.com
desc = ‘An extended IF adventure’
htmlDesc = ‘An extended IF adventure’

showCredit()
{
/* show our credits */
"Put credits for the game here. ";

/*******************************************************************************

  • The game credits are displayed first. *
    *******************************************************************************/
    “\b”;
    }

showAbout()
{
"Put information for players here. Many authors like to mention
any unusual commands here, along with background information on
the game (for example, the author might mention that the game
was created as an entry for a particular competition). ";
}
;

Second Section:


sessionInfo.showStartupOptions = nil;

/* show the title/author/version and startup options */

"\bThe Magic Forest
\nRelease <<versionInfo.version>> <<versionInfo.serialNum>>
\nCopyright ©2011 Ron \ Gaudet
/ Freeware / Type <<aHref(‘copyright’, ‘COPYRIGHT’)>> for details\n

<.p>If this is your first time playing this game, please type
<<aHref(‘about’, ‘ABOUT’)>> (or just ‘A’) for some important
information. To restore a position you saved earlier, type
<<aHref(‘restore’, ‘RESTORE’)>> (or ‘R’).
<.p>To <<aHref(’’, ‘begin the game’)>>, just press the Enter key. ";

Delete the code you added from my earlier reply and change your versionInfo object like this:

versionInfo: GameID
	IFID = '196fcc08-7a97-c389-9f06-5e7d3106fc33'
	name = 'The Magic Forest'
	byline = 'by Ron Gaudet'
	htmlByline = 'by <a href="mailto:rgaudet1938@buckeye-access.com">
		Ron Gaudet</a>'
	version = '1'
	authorEmail = 'Ron Gaudet <rgaudet1938@buckeye-access.com>'
	desc = 'An extended IF adventure'
	htmlDesc = 'An extended IF adventure'

	showCredit()
	{
		/* show our credits */
		"Put credits for the game here. ";

		/*******************************************************************************
		* The game credits are displayed first. *
		*******************************************************************************/
		"\b";
	}

	showAbout()
	{
		"Put information for players here. Many authors like to mention
		any unusual commands here, along with background information on
		the game (for example, the author might mention that the game
		was created as an entry for a particular competition). ";
	}

	serialNum = 12345678

	showCopyright()
	{
		"Copyright info here. ";
	}
;

That did it :exclamation: :exclamation:

Now I can move on to adding my rooms and other objects.

Many thanks,

RonG