TADS3: Runtime error: nil object reference

1.) Is there somewhere a list (with explanation) of TADS3 errors? I didn’t find such in the official TADS bookshelf. Maybe I overlooked it?

2.) I got this error:

	link -> mim.t3p
	preinit -> mim.t3
Here is my game description
Runtime error: nil object reference
fatal error: unhandled exception during preinit

I don’t know why preinit exists at all, and why it is a runtime error (not a linker error).

The command I use to create the TADS3 “image” (program) is:
t3make -D LANGUAGE=en_us -D MESSAGESTYLE=neu mim -lib system -lib adv3/adv3

(All done on Linux)

The “nil object reference” means that the code includes something that refers to a property or method on an object that doesn’t exist. Something like foo.counter = 1 if foo is nil.

If you re-compile with the -d flag and run the game again it’ll give you a line number for the source of the error.

1 Like

Then I get this error:
Runtime error: nil object reference

-->/usr/local/share/frobtads/tads3/lib/adv3/modid.t, line 448
   /usr/local/share/frobtads/tads3/lib/adv3/modid.t, line 195
   /usr/local/share/frobtads/tads3/lib/_main.t, line 425
   /usr/local/share/frobtads/tads3/lib/_main.t, line 471
   /usr/local/share/frobtads/tads3/lib/_main.t, line 589
   /usr/local/share/frobtads/tads3/lib/_main.t, line 472
   /usr/local/share/frobtads/tads3/lib/_main.t, line 558
   /usr/local/share/frobtads/tads3/lib/_main.t, line 288
   /usr/local/share/frobtads/tads3/lib/_main.t, line 75
   /usr/local/share/frobtads/tads3/lib/_main.t, line 31

But I use QTads, not frobtads

That’s the game trying to parse the game’s metadata and not finding the metadataKeys defined in GameInfoModuleID.

What’s the GameID declaration look like?

1 Like
IFID: 7BEF5FAB-8331-4B11-9422-32EF85CCEFE5
Name: Magic in Muenster
AuthorEmail: Peter Wiehe <info@pwiehe.de>

I mean the declaration in source, like the whole versionInfo declaration.

versionInfo: GameID
IFID = '7BEF5FAB-8331-4B11-9422-32EF85CCEFE5'
name = 'Magic in Muenster'
byLine = 'by Peter Wiehe'
authorEmail = 'Peter Wiehe <info@pwiehe.de>'
desc = "A yet uncomplete game about a mage learning the first magic"
version = '0.3'
;

Don’t double-quote the desc.

1 Like