You wrote an endless loop (a loop running forever) because the while condition is always
true
. You may easily check it running the following code:
GetServerStats, UserImbalance = "Lua Server Status", "Inbalance Pulsle"
print(UserImbalance)
FolderImBalanced, NewNilValue = true, false
while true do
FolderImBalanced = false
print("inside the loop")
end
print(FolderImBalanced)
In order to exit the loop, you have to, either
- Change the loop condition, e.g.
while FolderImBalanced do
FolderImBalanced = false
end
Or
- Use the
break
statement, e.g.
while true do
FolderImBalanced = false
break -- this exits the loop
end