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

12
LINES

< > BotCompany Repo | #266 // Chat tree include processor

Lua code

go("#265") -- json.encode/decode

snippetID = input
main = getSnippet(snippetID)
tree = json.decode(main)

for i=1, #tree do
  line=tree[i]
  if line[1] == 'include' then
    print("Include found!", line[2])
  end
end

Author comment

process ['include', '#someothersnippet'] statements in chat trees, such as #240

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 228 [visualize]

Snippet ID: #266
Snippet name: Chat tree include processor
Eternal ID of this version: #266/1
Text MD5: 2726503d9e77736c6a902530384e3934
Author: stefan
Category:
Type: Lua code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2014-03-29 13:13:33
Source code size: 228 bytes / 12 lines
Pitched / IR pitched: Yes / Yes
Views / Downloads: 918 / 204
Referenced in: [show references]