break exits loops (while/repeat) and return exits functions.
eg
|
Source code
|
1
2
3
4
5
6
7
8
9
10
11
|
function checkDead()
while true do
if targetDead then
break
elseif targetAggro then
return
end
targetNextPlayer()
end
resPlayer()
end
|
So if the target is dead it'll break loop and res, else if target has aggro on something it'll exit function so you can run another to deal with it.
all just made up functions ofc xD And could be totally wrong as well