Checking for guild and object program syntax

For builders to discuss and ask building questions.
Post Reply
Nedylene
Sword Grand Master
Sword Grand Master
Posts: 517
Joined: Mon Aug 25, 2003 2:00 am
Location: Zhentil Keep

Checking for guild and object program syntax

Post by Nedylene » Thu Sep 11, 2003 2:52 pm

Rechecking everything I happened upon a program I wrote a long time a go which I know looks just wrong. I wish this program to check that the person's guild is both invokers and that they are wearing or have the guild ring on them and this is what I wrote like four months ago... can someone help me get the correct format?

Code: Select all

>speach_prog key~
if actorhasobjnum($n) == QQ03
if guild($n) == invokers
mpechoat$ A light gathers in the palm of your hand and slowly consolidates into a key.
mpechoaround A bright light shines from $N hands.
mpoload QQ35
give iQQ35 $n
else
mpechoat A loud thud of echoes through your mind and leaves as quickly as it came.
endif
endif
~
|
Nedylene
Sword Grand Master
Sword Grand Master
Posts: 517
Joined: Mon Aug 25, 2003 2:00 am
Location: Zhentil Keep

Post by Nedylene » Thu Sep 11, 2003 4:49 pm

*winces* While most of those mistakes I didn't do on any of my other programs... one I did.... Geuss it will be taking me a bit longer to add in all of those spaces.
User avatar
Talos
Staff
Staff
Posts: 2097
Joined: Wed Jul 16, 2003 2:20 am
Location: Olympus Mons

Post by Talos » Thu Sep 11, 2003 6:27 pm

Would you want to have a second else with the "mpechoat $n A loud thud of echoes through ..." So that if either condition fails they get that echo? Right now they only get it if they fail the guild check, and get no echo at all if they fail the object check, correct?
A goblin, a trickster, a warrior? A nameless terrible thing, soaked in the blood of a billion galaxies. A most feared being in all the cosmos. Nothing could stop, hold, or reason with it. One day it would just drop out of the sky and tear down your world.
User avatar
Tempus
Staff
Staff
Posts: 669
Joined: Fri Jul 18, 2003 9:34 pm
Location: Warrior's Rest

Post by Tempus » Thu Sep 11, 2003 7:23 pm

I also think the 'of' is superfluous in that sentence. Either a loud thud echoes, or a loud thud of something echoes.
Dalvyn
Sword Grand Master
Sword Grand Master
Posts: 4708
Joined: Tue Jul 15, 2003 9:26 pm
Location: House of Wonder, Waterdeep

Post by Dalvyn » Sat Sep 13, 2003 11:37 am

The correct syntax is "if actorhasobjnum(QQ003)" I think.

Also, you might want to add " 's " in your first mpechoat : ... from $N's hands.
Post Reply