Aller au contenu

Photo

Text Appears Check


  • Veuillez vous connecter pour répondre
6 réponses à ce sujet

#1
Kingdom_Of_Hearts

Kingdom_Of_Hearts
  • Members
  • 72 messages
It compiles, however the text does not display. It's supposed to, even though it's checking for not having the feat and gold. Help? :) Thanks.

 int StartingConditional(){
   //Here we are checking for the gold amount with variables..    object oPC = GetPCSpeaker();    object oVa = GetItemPossessedBy(oPC, "VariableHolder");
    int nSkill = GetLocalInt(oVa, "SkillLevel");    int nECL   = GetLocalInt(oVa, "ECL");    int nGP    = nSkill + nECL * 100 + 400 * nSkill + nECL;
    if ( GetGold(oPC) >= nGP || GetHasFeat(FEAT_SPELL_FOCUS_CONJURATION, oPC))        return FALSE;

    return TRUE;}

#2
Khuzadrepa

Khuzadrepa
  • Members
  • 188 messages
Try swapping the FALSE and TRUE statements?

Another spot to look at is the equation that determines nGP. Are the order of operations correct?

I don't know exactly what you are trying to do, but those seem like the likely spots for an issue.

Hope that helps!

#3
Kingdom_Of_Hearts

Kingdom_Of_Hearts
  • Members
  • 72 messages
That worked. Awesome!

#4
Kingdom_Of_Hearts

Kingdom_Of_Hearts
  • Members
  • 72 messages
Getting confused and loss with these checks quickly. Can somebody confirm this; In the code below, if all the integers are true, but the GetHasFeat is not true, the text will appear?

if ( nB >= 2 || nC <= 1 || nD <= 1 || nP <= 6 || nR <= 6 || nS <= 2 || nW <= 1 )
return TRUE;

if ( GetHasFeat(FEAT_EXTEND_SPELL, oPC) )
return FALSE;

return TRUE;

#5
Squatting Monk

Squatting Monk
  • Members
  • 446 messages
No, in this snippet, if any of the int evaluations is TRUE, OR if oPC does not have the feat the text will appear.

#6
Kingdom_Of_Hearts

Kingdom_Of_Hearts
  • Members
  • 72 messages
Great. Got that part to work! This is for an alternate option, this text is supposed to appear. However, I've found that it's not working. I've not been able to spot some errors. The text is supposed to appear if oPC doesn't have more or equal gold, or if they have the feat, or if the integers don't return true. Is this correct?

if ( GetGold(oPC) >= nGP )
return FALSE;

if ( nB >= 2 || nC >= 1 || nD >= 1 || nP >= 6 || nR >= 6 || nS >= 2 || nW >= 1)
return FALSE;

if ( GetHasFeat(FEAT_EXTEND_SPELL, oPC) )
return TRUE;

return TRUE;
}

#7
Lightfoot8

Lightfoot8
  • Members
  • 2 535 messages
return (GetGold(oPC) <= nGP) || GetHasFeat(FEAT_EXTEND_SPELL, oPC) || ! ( nB >= 2 || nC >= 1 || nD >= 1 || nP >= 6 || nR >= 6 || nS >= 2 || nW >= 1);