summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeija <norrepli@gmail.com>2012-08-13 23:20:29 +0200
committerJeija <norrepli@gmail.com>2012-08-13 23:20:29 +0200
commit67dfa93c2e897e31dfcd33f66e2662531de937bd (patch)
tree9cbaf177b8af66f54c744959d1437e32e8942eeb
parent5ede8f370c8b9c0f2a425e0e9041b8978a2d3e61 (diff)
downloadmesecons-67dfa93c2e897e31dfcd33f66e2662531de937bd.tar
mesecons-67dfa93c2e897e31dfcd33f66e2662531de937bd.tar.gz
mesecons-67dfa93c2e897e31dfcd33f66e2662531de937bd.tar.bz2
mesecons-67dfa93c2e897e31dfcd33f66e2662531de937bd.tar.xz
mesecons-67dfa93c2e897e31dfcd33f66e2662531de937bd.zip
Finish after() command: works now
-rw-r--r--mesecons_microcontroller/init.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/mesecons_microcontroller/init.lua b/mesecons_microcontroller/init.lua
index f57c9df..fc7809c 100644
--- a/mesecons_microcontroller/init.lua
+++ b/mesecons_microcontroller/init.lua
@@ -407,7 +407,11 @@ end
function yc_command_after_execute(params)
local meta = minetest.env:get_meta(params.pos)
if meta:get_int("afterid") == params.afterid then --make sure the node has not been changed
- yc_parsecode(params.code, params.pos)
+ if yc_parsecode(params.code, params.pos) == nil then
+ meta:set_string("infotext", "Code in after() not valid!")
+ else
+ meta:set_string("infotext", "Working Microcontroller")
+ end
end
end