#Round System Loop isnt breaking. Help me for a cookie .im new to scripting i got the script from tut

17 messages · Page 1 of 1 (latest)

knotty vale
#

This is my script i want to break the loop when the round is over becouse 1 or 0 players are left so that the intermission phase starts again.

glossy marsh
#

Use break

#

Breaks loops

knotty vale
#

isnt working

glossy marsh
#

The break only breaks the innermost loop you called it in

#

You need to stack the breaks

#
IsBroken = false
while true do
  if IsBroken then break end
  if ... then
    IsBroken = true
    if IsBroken then
      break
    end
  end
end
knotty vale
#

so i paste this all in the last part of the script before all the ends

knotty vale
glossy marsh
#

Just before your while loop, add the following line;

**local IsBroken = false
**
Then, just after the while true do line, add;

if IsBroken then break end

Where you added the break in each if statement before, just change the break to;

IsBroken = true

knotty vale
#

ok Thank you soo much i will test it now

knotty vale
#

@glossy marsh