I see. I have some bad logic somewhere. What’s the proper way to make one of these: {You’re/his}? for my illogical. Like ‘{You/he} can’t equip {that dobj/him} without it in {You’re/his} inventory.’
The logic you gave me working but it always goes to the not holding code, even though I’m holding it. On take I move it into my character: gDobj.moveInto(gActor). And I can drop it, so I know it was there.
verify()
{
if(gDobj && gDobj.isHeldBy(gActor))
{
switch(self.classification)
{
case 'wpn':
// test if already equipped
foreach(local x in gActor.contents)
{
if(gDobj == x)
{
if(x.isEquipped)
{
illogical('{that dobj/him} is already equipped.');
}else{
// test if character class in wpn class
if(self.classList.indexOf(gActor.charClass) == nil)
{
illogical('{You/he} do{es}n\'t equip
{that dobj/him}.');
}
}
}
}
break;
case 'arm':
// test if character class in arm class
foreach(local x in gActor.contents)
{
if(gDobj == x)
{
if(x.isEquipped)
{
illogical('{that dobj/him} is already equipped.');
}else{
// test if character class in wpn class
if(self.classList.indexOf(gActor.charClass) == nil)
{
illogical('{You/he} do{es}n\'t equip
{that dobj/him}.');
}
}
}
}
break;
case 'acc':
// test if character class in arm class
foreach(local x in gActor.contents)
{
if(gDobj == x)
{
if(x.isEquipped)
{
illogical('{that dobj/him} is already equipped.');
}
}
}
break;
case 'itm':
illogical('{You/he} can\'t equip
{that dobj/him}.');
break;
case 'kitm':
illogical('{You/he} can\'t equip
{that dobj/him}.');
break;
}
}else{
illogical('{You/he} can\'t equip
{that dobj/him} without it in inventory.');
}
// end verify
}