In a previous episode, I was trying to switch the PC to another character. That has since been solved, thanks to Ben. But in pursuing that on my own, I’ve created a persistent weird compile error.
I was (mis)using “intialPlayerChar = …” mid-game for this purpose.
It didn’t work. Therefore I tried “gameMain.initialPlayerChar = …”
That didn’t work. Therefore I tried making a method in gameMain that would take a parameter and set the PC to the parameter. I figured that the gameMain object didn’t like outside code fiddling with its data.
That didn’t work, so I tried creating gameMain’s PC assignment method inside a pre-game intialization code, on the theory I was getting to gameMain too late. That didn’t work either – turns out all of this was a red herring; could the intialPlayerChar documentation perhaps mention gPlayerChar? – but now I have a weird compile error I can’t clear.
It seems that I’ve somehow created an EXTRA gameMain object, that I CAN’T get rid of.
I’ve tried Build > Clean (Delete Derived Files), followed by Build > Full Recompile for Debugging.
The code I still have, commented out, is this –
[code]/*
myInitObj: PreinitObject
execute()
{
modify GameMainDef
setPC (somePC)
{
initialPlayerChar = somePC;
"hmmm... ";
}
}
;
*/[/code]
–doesn’t mean this is the only version of that code I tried, but I don’t think I did anything much outside of this.
Any thoughts?
Error message follows…
…
[code]>t3make -Fy “C:\Users\Conrad\Documents\TADS 3\obj” -Fo “C:\Users\Conrad\Documents\TADS 3\obj” -o “Amys Key_dbg.t3" -D "TADS_INCLUDE_NET" -D "LANGUAGE=en_us" -D "MESSAGESTYLE=neu" -v -d -statprefix <@> -statpct "Amy
s Key.t” “system.tl” “adv3\adv3web.tl” “webui.tl” “tadsnet.t” “other\scenes_ee.t” “AK_act1.t” “AK_act2.t” “AK_act3.t” “AK_verbs.t” -res “GameInfo.txt”
TADS Compiler 3.1.0 Copyright 1999, 2010 Michael J. Roberts
error:
The symbol “showGoodbye”, which was originally defined of type function, is
redefined with type property in object file “C:\Users\Conrad\Documents\TADS
3\obj\misc.t3o”. A global symbol can be defined only once in the entire
program. You must change one of the symbol’s names in one of your source files
to remove the conflict.
If you recently changed the meaning of this symbol,
you might simply need to do a full recompile - try building again with the -a
option.
error:
The symbol “showIntro”, which was originally defined of type function, is
redefined with type property in object file “C:\Users\Conrad\Documents\TADS
3\obj\misc.t3o”. A global symbol can be defined only once in the entire
program. You must change one of the symbol’s names in one of your source files
to remove the conflict.
If you recently changed the meaning of this symbol,
you might simply need to do a full recompile - try building again with the -a
option.
Errors: 2
Warnings: 0
t3make: error code 1
Build failed.[/code]