Go To The Light - TADS3.1

Some time back I started a post titled ‘Giving light to the actor’. Bcressy furnished me with some code
for this and it worked great. It involved a magic ring which when worn by the actor turned him into a powerful wizard. I’ve since redone all of my game code and now this wizard code doesn’t work. I’ve worked on it for a few days but can’t find the answer to all the problems this piece of code is causing. I could use some help from anyone who’d care to give it.

RonG

Can you post the compiler error you’re getting, and the code around the line numbers it refers to?

I’ve removed some suspicious code from the end of my game. Next I’ll re-insert all of the ‘wizard’ code.
Will give it a try then send you the results and the errors.

RonG

Here is the entire section containing any wizard coding. The error I now get is under the ‘modify glowAction if-else section’. The first ‘if’ statement about power level gives me the following error
‘power level is undefined but appears to be a property name’

[code]/* Add wizard’s ring to beach. **********************************************/

ring: Wearable ‘platinum ring’ ‘platinum ring’
"Faint cryptic runes are inscribed around the band of the platinum ring. "
location=beach
dobjFor(Wear){
action(){
inherited();
"You feel a strange magical power coursing through your body! And, you
hear the faint echo of the word GLOW surrounding you. ";
gActor.makeWizard();
}
}

dobjFor(Doff){
action(){
inherited();
"You shudder as the power of the ring and the magic of the GLOW chant
leave you. ";
gActor.makeNormal();
}
}
;

DefineIAction(Glow);
VerbRule(Glow)
‘glow’
:GlowAction
VerbPhrase=‘glow/glowing’
;

modify GlowAction
execAction(){
if(gActor.powerLevel!=wizard){
reportFailure(‘At this time, you do not have the power of a wizard.’);
}
else if(gActor.brightness!=0){
"The blue, radiant light quickly fades from your body. ";
gActor.brightness=0;
}
else{
"You chant the GLOW spell!
Your body begins to glow with a bright, radiating blue light! ";
gActor.brightness=10;
}
}
;

/* Make ‘wizard’ constant. ***************************************************/

enum wizard,normal;

/* Show Actor/Player. *******************************************************/

+me: BagOfHolding, Actor
vocabWords = ‘Tom Thomas Tom/Thomas/Leavens’
desc
{
"You are Thomas Leavens; also known as Dr. Tom by all your friends and
associates. Your ex-wife calls you names that could never be repeated!
Aside from your underwear an socks, you are wearing your normal field
attire. ";
}

bulk = 10

/* Make/Unmake wizard. ******************************************************/

makeWizard(){
powerLevel=wizard;
}
makeNormal(){
powerLevel=normal;
brightness=0;
}
[/code]

You need to add the powerLevel property to the me Actor:

powerLevel = normal

Somewhere before the semicolon that ends the object definition.

Thanks for the help. That did it. Don’t know how I managed to miss that. Should have paid closer attention. I’m finally ready to start adding rooms and other objects.

RonG