Lone Wolf Development Forums

Lone Wolf Development Forums (http://forums.wolflair.com/index.php)
-   HL - Savage Worlds (http://forums.wolflair.com/forumdisplay.php?f=59)
-   -   Code works but still get an error (Attribute or Skill for Edge) (http://forums.wolflair.com/showthread.php?t=61803)

Gumbytie December 11th, 2018 04:33 PM

Code works but still get an error (Attribute or Skill for Edge)
 
Here is the code:

Code:

validif (hero.child[attrSpi].field[trtFinal].value >= 6)
validif (hero.child[skBBDreaming].field[trtFinal].value >= 5)
if (@ispick <> 0) then
  altpick.linkvalid = 0
endif

Prereq for an Edge, either Have Spirit 12+ or Dreaming (Arcane) skill d10+. So it works but gives an error if the character hasn't actually purchased the skill Dreaming (Arcane) first. I figure I don't want hero.child for skBBDreaming but not sure what to use instead.

zarlor December 11th, 2018 04:48 PM

What about "Menu #1 Source: All Picks on Hero (this will make sure you don't get an error for trying to modify a skill that doesn't exist on the character)" (from the Common Code thread). Have you tried setting that?

CapedCrusader December 11th, 2018 07:26 PM

Just use:

Code:

validif (hero.childfound[skBBDreaming].field[trtFinal].value >= 5)

zarlor December 12th, 2018 04:47 AM

But it's an either/or check so I would think you'd need to set it to valid if either situation were true.

CapedCrusader December 13th, 2018 10:56 PM

It does. It tries one, then the other. If it hits a "valid" it exits with a true.

If not then it falls through to the "if" and it marks it as invalid if it's a pick. Then exits with a false.

zarlor December 14th, 2018 03:33 AM

Oh, sorry, i missed the "childfound" rather than "child" part so your suggesting was just a replacement on that one line. I missed that.


All times are GMT -8. The time now is 07:03 PM.

Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.