Yahoo Poland Wyszukiwanie w Internecie

Search results

  1. In this article, the while loop is used to repeat instructions forever. To create a while loop that repeats forever, use the syntax below, being sure to include instructions between the do and end keywords.

  2. 8 gru 2022 · Both while and repeat until loops can be used to repeat a task until a certain condition is met. If you want to repeat a task while a certain condition is true, you can use a while loop. For example: while num < 10 do print("Number is less than 10") num = num + 1 end

  3. 13 lis 2021 · Using while loops (especially while true do) is pretty chaotic coding and has a ton of potential to cause bugs in your game. Also do task.wait() instead of just wait() . It’s the new version of it

  4. 10 lis 2022 · The main problem with while loops are either lack of intervals by nature of a yielding condition (be it task.wait or a yielding function call) or yielding at the start of an iteration which makes the loop somewhat unmaintainable.

  5. 4 maj 2024 · Instead of using a while loop with wait () inside, can’t you just get the time (using os.clock () I think), and since it’s in seconds, you can do something like so : while Status.Value do. local frames = -- put the number of frames for the TV you have here. local frame = (((os.clock()%8) * frames) // 8) +1.

  6. 26 paź 2022 · In general, regardless of if it’s a while loop or not, you shouldnt rely too heavily on loops. Try to make as much of your code as event-driven as possible. There’s not as many problems that require loops as the solution.

  7. 14 sty 2024 · While Loops. A while loop is a loop that will always run as long it has a condition that is true. If the condition is set to false or nil, it will not loop at all. Everything that comes after a while, except false and nil, will always be seen as true.

  1. Ludzie szukają również