forked from mtcontrib/pdisc
add us time instruction
M faden.lua M standardbefehlssatz.lua
This commit is contained in:
parent
53c47b17ab
commit
b03c1fe61b
@ -29,11 +29,12 @@ local function befehl_ausfuhren(faden)
|
|||||||
end
|
end
|
||||||
for i,v in pairs(ergebnis) do
|
for i,v in pairs(ergebnis) do
|
||||||
if not ersetzbar[i] then
|
if not ersetzbar[i] then
|
||||||
return false, "Attempt on changing an immediate"
|
-- message sometimes incorrect
|
||||||
|
return false, "Command " .. befehl .. ": Attempt on changing an immediate"
|
||||||
end
|
end
|
||||||
if not args[i] then
|
if not args[i] then
|
||||||
-- FIXME
|
-- can this happen? Is it a mistake in instruction set? bef ,b,,d
|
||||||
error"[pdisc] instruction set attempt to write in void"
|
return false, "Command " .. befehl .. ": Missing target argument"
|
||||||
end
|
end
|
||||||
vars[args[i]] = v
|
vars[args[i]] = v
|
||||||
end
|
end
|
||||||
@ -51,7 +52,7 @@ end
|
|||||||
local function programm_ausfuhren(faden)
|
local function programm_ausfuhren(faden)
|
||||||
local weiter,msg = befehl_ausfuhren(faden)
|
local weiter,msg = befehl_ausfuhren(faden)
|
||||||
if not weiter then
|
if not weiter then
|
||||||
faden.log = faden.log .. "Aborted: " .. msg .. "\n"
|
faden.log = faden.log .. "Aborted (" .. faden.ip .. "): " .. msg .. "\n"
|
||||||
faden:exit()
|
faden:exit()
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
@ -192,6 +192,10 @@ s = {
|
|||||||
return true
|
return true
|
||||||
end,
|
end,
|
||||||
|
|
||||||
|
get_us_time = function()
|
||||||
|
return true, minetest.get_us_time()
|
||||||
|
end,
|
||||||
|
|
||||||
tostring = function(params)
|
tostring = function(params)
|
||||||
if #params ~= 1 then
|
if #params ~= 1 then
|
||||||
return false, WNOA
|
return false, WNOA
|
||||||
|
Loading…
Reference in New Issue
Block a user