SilentNN
New member
I'm fairly new to scripting. Even basic scripting. Heck, even KoLmafia.
I've read the general ASH tut by Xylpher (link) and I could understand most of it. I'm still a bit shaky with a few things, but I know how to make ASH scripts for the most part. There were a few parts where Xylpher put things into the script without taking note of them, so I have a few questions.
First, what is the difference between using = and ==? I think I've even seen a === in a script somewhere before.
What is the int, boolean, string, class, float, and whatnot that precedes so many entries in the wiki? Does that mean the thing (I don't know what it's called.), such as my_level(), returns (returns is a misleading word to me) an integer? And for boolean, it's yes/true or no/false? If so, what are the others? And what about when you put something like int into a script. Does the "word" (again, don't know what to call it) become a variable to be defined? I.E. int iterations.
I've seen scripts that started out with the line (well, there's a void in the line before) "int iterations;". What does this do? Does iterations become a variable, to be defined later? If so, can it also be defined now, like "int iterations = 0;" (again, not sure about = and ==)?
I probably have more questions, but I don't have the time to think of them and type them out, so until later and thanks in advance.
I've read the general ASH tut by Xylpher (link) and I could understand most of it. I'm still a bit shaky with a few things, but I know how to make ASH scripts for the most part. There were a few parts where Xylpher put things into the script without taking note of them, so I have a few questions.
First, what is the difference between using = and ==? I think I've even seen a === in a script somewhere before.
What is the int, boolean, string, class, float, and whatnot that precedes so many entries in the wiki? Does that mean the thing (I don't know what it's called.), such as my_level(), returns (returns is a misleading word to me) an integer? And for boolean, it's yes/true or no/false? If so, what are the others? And what about when you put something like int into a script. Does the "word" (again, don't know what to call it) become a variable to be defined? I.E. int iterations.
I've seen scripts that started out with the line (well, there's a void in the line before) "int iterations;". What does this do? Does iterations become a variable, to be defined later? If so, can it also be defined now, like "int iterations = 0;" (again, not sure about = and ==)?
I probably have more questions, but I don't have the time to think of them and type them out, so until later and thanks in advance.