[I] have to shorten my ambitions about writing an genethical algorithm for multiplayer.
Also I am looking forward for the list/library with all ingame functions ( like get_bet_info(1).tc ) and all the other.
local funcs = {}
for name, var in pairs(_G) do
if type(var) == "function" then
table.insert(funcs, name)
end
end
table.sort(funcs)
local out = io.open("functions.txt", "w")
if out == nil then
error("Unable to create functions.txt")
end
for k, name in pairs(funcs) do
out:write(name.."\n")
end
out:close()
It will generete a file called "functions.txt" in your script folder that countains all function names sorted alphabetically. Some of those are Lua functions for which you will find documentation online. The rest are Toribash functions. For some of those there are examples in the script/sdk folder. Also a few of those functions are deprecated and don't do anything.
If I want to retrieve information with, for example, get_bet_info:
Where do I find what information I can retrieve with this command?
I want to know how many options there are and what these options are, is there a way to have a list of them?
for key, value in pairs(get_bet_info(0)) do
echo(key .. " => " .. value)
end