Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

12
LINES

< > BotCompany Repo | #127 // Snippet combiner (loadSnippets)

Lua code

local split = extractFromSnippet(125, 'split')

-- takes list of snippet IDs as input, e.g. "118 124"
-- env may be nil, then it's _G (as with loadSnippet)
-- Note: loadSnippets does not require the extra ().
-- So it's not loadSnippets(...)() - just one set of
-- brackets.
function loadSnippets(snippets, env)
  for _, s in ipairs(split(snippets)) do
    loadSnippet(s, env)()
  end
end

test run  test run with input  download  show line numbers   

Travelled to 12 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Image recognition results

Recognizer Recognition Result Visualize Recalc
#308 399 [visualize]

Snippet ID: #127
Snippet name: Snippet combiner (loadSnippets)
Eternal ID of this version: #127/1
Text MD5: c13863b82dcf05739ce0b0b8b642841d
Author: stefan
Category: wrappers
Type: Lua code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2014-01-10 17:58:09
Source code size: 399 bytes / 12 lines
Pitched / IR pitched: Yes / Yes
Views / Downloads: 978 / 558
Referenced in: [show references]