|
| 06 Jan 2013 06:05 PM |
If any of you struggle with loops and don't know how to start a loop, I have a way to make it simpler. First of all, when you want to create a loop, you start off with "while true do". If that's to complicated, I have a term not as many people use to help you understand what "while true do" means. Okay, so first you type in "while true do" and delete "true". Replace "true" with "1 + 1 == 2". This helps you understand true because the simple math problem 1 + 1 = 2 is a real and true math problem. I am not exactly sure why there are double "=" signs, but it is the working way and not some typo I typed accidentally.
TL;DR - "while true do" can be replaced with "1 + 1 == 2"
Sorry if a lot of you guys already knew this, it was to help other people who do not know how to use loops and/or start loops.
Hope this helped you, and thank you for reading! |
|
|
| Report Abuse |
|
|
| 06 Jan 2013 06:10 PM |
The double '=' means that you are comparing something to something. If you only use 1 '=' then you are setting the value.
e.g
print(1+1==2) -> true |
|
|
| Report Abuse |
|
|
| 06 Jan 2013 06:15 PM |
That isn't the ONLY way to start a loop. You also forgot to mention that you'd need a wait() so it doesn't crash. A couple other loops could be:
for loops, repeat statements, and recursion.
~ṡсɾïρτïṉģ hεlρεɾṡ ۩ lυαlεαɾṉεɾṡ ④ øƒвќṃṿј~ ღ ▂▃▅▆█ρεώḋïερïε☄сυτïερïε█▆▅▃▂ღ 【▬】 |
|
|
| Report Abuse |
|