Originally Posted by
Tgo01
The indents just make the code a lot easier to read. Like if you're writing an if/else statement then you start the statement with if and end it with end, so you would write it like:
Code:
if a != b
if a == b
echo "Wait, what am I saying?"
else
echo "no idea"
end
else
if b == c
echo "Huh?
elsif 1 == 2
echo "1 can't equal 2!"
else
echo "Could you repeat that?"
end
end
This way you can easily see which else/elsif/end belong to which if statements, you can also easily tell which code falls under which if/else statement.
Likewise the following code would work just as well but if you ever want to edit the code in the future it might be a bit confusing:
Code:
if a != b
if a == b
echo "Wait, what am I saying?"
else
echo "no idea"
end
else
if b == c
echo "Huh?
elsif 1 == 2
echo "1 can't equal 2!"
else
echo "Could you repeat that?"
end
end
I'm not sure what you're asking.
Questions are welcomed and encouraged! How else is one supposed to learn?
I think he's asking about functions. to which the answer is, yes. They're defined in lich.rbw itself. Look for any lines that begin with "def name_of_some_function_here" or similar. That's where you would find things like where the code for "checkstamina" or "percentmind" (functions you can call in scripts) are.
http://www.howtogeek.com/howto/progr...method-syntax/
Last edited by Donquix; 05-25-2015 at 11:12 PM.
Mithrilschlong, 2015-03-10 to slightly later on 2015-03-10. You will not be forgotten!
usable Meteor Swarm, late 2020-12-30 to early 2020-12-31. You will also not be forgotten!