• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

ATTN: Mathias

EightBitz

Well-known member
A loooooong time ago, I posted a validation script that used if/then/elseif logic which assigned a value of either @valid=0 or @valid=1.

You admonished me for writing a validation script in that manner, and told me to use validif instead. You asked me where I got the idea to write such a funky script, and while I assured you I got it from an official example, I could not (at the time) recall where, nor did my searches net any results.

However, I can now present you with this:
http://hlkitwiki.wolflair.com/index.php5?title=Validate_Script

Scroll to the bottom.

I just wanted you to know that I'm not crazy. :-p

(Well, I am, but just not on this point.)
 
A loooooong time ago, I posted a validation script that used if/then/elseif logic which assigned a value of either @valid=0 or @valid=1.

You admonished me for writing a validation script in that manner, and told me to use validif instead. You asked me where I got the idea to write such a funky script, and while I assured you I got it from an official example, I could not (at the time) recall where, nor did my searches net any results.

However, I can now present you with this:
http://hlkitwiki.wolflair.com/index.php5?title=Validate_Script

Scroll to the bottom.

I just wanted you to know that I'm not crazy. :-p

(Well, I am, but just not on this point.)

LOL.... we all know that the wiki is woefully out of date, last being updated somewhere around 8-9 years ago. Sadly, they don't have the resources to update even simple errors which have been pointed out over the years and can't or won't open up the wiki to a small subset of trusted data file authors to correct and extend the existing information.
 
A loooooong time ago, I posted a validation script that used if/then/elseif logic which assigned a value of either @valid=0 or @valid=1.
I still use @valid for logic but I admit its usually for more complex IF statements or ones I have to validate multiple values. If its simple I do prefer the validif() as its easy. :)
 
I'm not sure exactly what I said in whatever you were originally referring to, but if I recommended validif as opposed to if () then @valid = 1 endif, it was not intended to admonish - I intended it to save you typing while you work. What you've linked to here is a teaching script - this script is showing all of its work, so the reader can see the whole process of how @valid works, instead of just seeing the validif ().

Maybe you're referring to something else I don't recommend doing - there are several places in d20 (some of which made it into Pathfinder), where a prereq starts with

@valid = 0

Which is just setting a value to what the value was already set as a default, which makes that line of code redundant.
 
Last edited:
I still use @valid for logic but I admit its usually for more complex IF statements or ones I have to validate multiple values. If its simple I do prefer the validif() as its easy. :)

Sure. It's just a little bit frustrating for someone who's just starting out on trying to grapple with the complexity of the authoring kit when most newb questions are met with "read the wiki", and when one does read the wiki, is asked, "why are you doing it that way when there's a better way?"

Well ... because I read the wiki. :-p
 
Sure. It's just a little bit frustrating for someone who's just starting out on trying to grapple with the complexity of the authoring kit when most newb questions are met with "read the wiki", and when one does read the wiki, is asked, "why are you doing it that way when there's a better way?"

Well ... because I read the wiki. :-p
Totally true statement. When I am teaching people at work sometimes I let in logic that is not the most streamlined. Which is the difference between using @valid and validif(). Its cleaner and shorter to use validif() but HL will work just fine if you use @valid. Nothing 'logically' wrong with @valid its just nicer to use validif().

Like Mathias said old script logic in d20 uses @valid allot. Heck it also uses the result = logic instead of perform but both will work. :(

Something that is easy to forget is how frustrating it is to learn scripting. This is what myself and those teaching need to keep in mind. But human nature is such that once you climb that hill you sort of forget the pain of the climb. :)
 
I'm not sure exactly what I said in whatever you were originally referring to, but if I recommended validif as opposed to if () then @valid = 1 endif, it was not intended to admonish - I intended it to save you typing while you work. What you've linked to here is a teaching script - this script is showing all of its work, so the reader can see the whole process of how @valid works, instead of just seeing the validif ().

Maybe you're referring to something else I don't recommend doing - there are several places in d20 (some of which made it into Pathfinder), where a prereq starts with

@valid = 0

Which is just setting a value to what the value was already set as a default, which makes that line of code redundant.

Not a big deal. I just wanted to tease you a little bit. :-p

I can imagine what things are like from your side of the table. I'm sure you field a lot of questions where even though it's the first time that particular person is asking, it's the 1000th time for you. I get that.

I also get that you don't want yourself and other LWD coders to fall into the trap of being the effective co-author of everyone's pet project.

So, don't take me too seriously here. Just having some fun. :-)
 
Back
Top