xxxxxxxxxx
function setVariables():
set {variables::1} to "value"
set {variables::list::2} to true
set {variables::3} to 3
xxxxxxxxxx
function listContains(list: objects, search: object) :: boolean:
loop {_list::*}:
if loop-value is {_search}:
return true
return false # If return true is triggered it will stop the code so this line will not be triggered.
xxxxxxxxxx
function reversed(list: objects) :: objects:
loop size of {_list::*} times:
set {_index} to size of {_list::*} - loop-number - 1
add {_list::%{_index}%} to {_reversed::*}
return {_reversed::*}
xxxxxxxxxx
set {_numbersList::*} to 6, 3 and 9
set {_result} to total({_numbersList::*})
if total(1, 6 and 9) is 16:
send "True"
send "%total({_numbers::*})%"
xxxxxxxxxx
function total(numbers: numbers) :: number:
broadcast "total function called"
loop {_numbers::*}:
add loop-value to {_total}
return {_total}
xxxxxxxxxx
function sendMessage(players: players, message: text, times: number = 1):
loop {_times} times:
send {_message} to {_players::*}