so i’m not off to an auspicious start with TADS/adv3lite.
why does this not work?
up_a_tree: Room 'Up A Tree' 'up a tree'
"You are standing on a thick branch high in a large oak tree. "
up: TravelConnector
{
destination = higher_up_a_tree
travelDesc = "You grab onto a branch and clamber upward. "
}
;
higher_up_a_tree: Room 'Higher Up A Tree' 'higher up a tree'
"This spot is doing no favors for your acrophobia. You're near the crown of a large
oak tree. "
down: TravelConnector
{
destination = up_a_tree
travelDesc = "You clamber downward through the branches. "
}
;
it starts out fine, putting me in up_a_tree. the UP exit is listed in the status bar. but typing “up” produces the response “Nothing obvious happens” and the Room Header and exits in the status bar go blank (happens with gargoyle and electrote) and typing “exits” produces a “Runtime error: nil object reference”.
In TADS 3 stuff like room definitions shouldn’t go into a header file. The TADS 3 way of doing things is to put all the game code into a .t files. Also in adv3Lite the me object should be of the Player class rather than the Actor class, though that’s not what’s causing the problem here.
As a first step, try getting rid of your header (.h) file and putting everything in the same file as your gameMain definintion:
me: Player
location = up_a_tree
;
up_a_tree: Room 'Up A Tree' 'up a tree'
"You are standing on a thick branch high in a large oak tree. "
up: TravelConnector
{
destination = higher_up_a_tree
travelDesc = "You grab onto a branch and clamber upward. "
}
;
higher_up_a_tree: Room 'Higher Up A Tree' 'higher up a tree'
"This spot is doing no favors for your acrophobia. You're near the crown of a large
oak tree. "
This works for me when I compile and run it in Workbench, at any rate.
when i replace “me: Actor” with “me: Player” i get the compiler error:
error: undefined symbol “Player” (used as superclass of “me”)
so this is the entire file, header removed. i still get the same problem.
#charset "us-ascii"
#include <adv3.h>
#include <en_us.h>
versionInfo: GameID
name = 'My Practice Game'
byLine = 'by an Aspiring Author'
version = '1'
;
gameMain: GameMainDef
initialPlayerChar = me
;
me: Actor
location = up_a_tree
;
up_a_tree: Room 'Up A Tree'
"You are standing on a thick branch high in a large oak tree. "
up: TravelConnector
{
destination = higher_up_a_tree
travelDesc = "You grab onto a branch and clamber upward. "
}
;
higher_up_a_tree: Room 'Higher Up A Tree'
"This spot is doing no favors for your acrophobia. You're near the crown of a large
oak tree. "
down: TravelConnector
{
destination = up_a_tree
travelDesc = "You clamber downward through the branches. "
}
;
2.1.1 is the current version, which definitely does define the Player class, so this is getting odder and odder. Have you tried doing a full recompile for debugging? I’m not sure that’s it, though.
But now I look at your code again, you don’t seem to be including the right header files for adv3Lite. They should be:
now the compiler can’t find it:
unable to open library file “usr/local/share/frobtads/tads3/lib/extensions/adv3lite/adv3lite.tl”
my makefile looks like this (this is on a mac BTW):
-D LANGUAGE=en_us
-D MESSAGESTYLE=neu
-Fy obj -Fo obj
-o the_witch.t3
-lib system
-lib usr/local/share/frobtads/tads3/lib/extensions/adv3lite/
-source the_witch.t
if i stick adv3lite.tl at the end of that file path it still can’t find it.
Obviously, I don’t know the folder/directory structure on your machine, but I guess the next thing to check would be whether it corresponds to that in your makefile (I wouldn’t expect tads3 to be a subdirectory of frobtads or extensions/adv3lite to come under a lib folder, but maybe that’s how you’ve got it set up). If that doesn’t reveal the answer, maybe someone who uses TADS 3 on a Mac can help.
If you have tried to install adv3Lite under the main TADS 3/lib directory, that could be the problem. It should ideally go somewhere different, such as documents/TADS 3/extensions/adv3Lite. Otherwise you may risk getting a mix of adv3 and adv3Lite files, which could be what’s giving you your duplicate file error.
I still highly recommend that you get all of your TADS libraries out of /usr/local/share. Put both libraries in a TADSStuff directory somewhere under your home directory. Update the paths in your .t3m, making sure your .t #includes are also correct, and maybe just to be safe use full pathnames (for instance, my t3m looks like this:)
You might also try writing full paths in your #include statements just to make sure you’re not getting a double… until you get the filesystem stuff worked out. I have both libraries on my Mac and no duplicate issues.
ok i just did a clean reinstall (again, on a mac), not even messing with adv3lite this time, just TADS.
everything allowed to install in the default locations.
i am compiling the basic TADS “quickstart” game file verbatim against this default installation and still get the error:
error: module “lib.t” has the same name as an existing module
i have not moved anything or done anything that’s not explicitly in the frobtads installation instructions. it just doesn’t work (or it works but requires a level of expertise that is simply not available to someone like me who just wants to write IF and isn’t a coding expert. although i have to say i have never had an issue compiling/installing multiple other IF development packages).
yes i’ve tried multiple configurations including moving everything to ~/TADS, ~/Documents/TADS. tried some others as well.
didn’t make any difference, same compiler error.
Extremely odd. And when you moved the tads3 folder to one of those locations, all pathnames in .t3m and in the #includes of your .t file pointed to those locations?