update readme

M  README.md
M  faden.lua
This commit is contained in:
HybridDog 2016-11-13 14:53:52 +01:00
parent b3ce57c5b4
commit 479885a80f
2 changed files with 35 additions and 1 deletions

View File

@ -8,3 +8,37 @@ true/false: boolean (immediate)
12.6: number (immediate)
$hello nwae: string (immediate)
nodolla: either a label is called so (immediate) or it's a variable
How to use this mod:
```
local mylog = print
local parsed_code = pdisc.parse(code_text)
local function mystart(parsed_code)
local thread = pdisc.create_thread(function(thread)
thread.flush = function(self)
mylog(self.log)
self.log = ""
return true
end
end, parsed_code)
mykeepalive()
end
mystart(parsed_code)
local function mykeepalive()
thread:suscitate()
if not thread.stopped then
return
end
thread:try_rebirth()
minetest.after(0.1, function()
mykeepalive()
end)
end
```

View File

@ -54,7 +54,7 @@ local function programm_ausfuhren(faden)
return not faden.stopped and programm_ausfuhren(faden)
end
return function (faden_manip, parsed)
return function(faden_manip, parsed)
local faden = {
log = "",
ip = 1,