aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/LuaSL/src/LSL.lua
diff options
context:
space:
mode:
Diffstat (limited to 'LuaSL/src/LSL.lua')
-rw-r--r--LuaSL/src/LSL.lua13
1 files changed, 9 insertions, 4 deletions
diff --git a/LuaSL/src/LSL.lua b/LuaSL/src/LSL.lua
index 8861bf3..b8e2d4b 100644
--- a/LuaSL/src/LSL.lua
+++ b/LuaSL/src/LSL.lua
@@ -94,14 +94,19 @@ function args2string(doType, ...)
94 return temp 94 return temp
95end 95end
96 96
97function mt.callAndReturn(name, ... ) 97function mt.callAndReturn(name, ...)
98 print("mt.callAndReturn(" .. name .. "(" .. args2string(true, ...) .. "))") 98 luaproc.sendback(name .. "(" .. args2string(true, ...) .. ")")
99end 99end
100 100
101function mt.callAndWait(name, ... ) 101function mt.callAndWait(name, ...)
102 local func = functions[name] 102 local func = functions[name]
103 103
104 print("mt.callAndWait(" .. name .. "(" .. args2string(true, ...) .. "))") 104 mt.callAndReturn(name, ...);
105
106--[[ TODO - do a luaproc sync receive() waiting for the result.
107 Eventually a sendForth() is called, which should end up passing through SendToChannel().
108 The format of the result should be something like - SID.result({x=0.45, y=0.6, z=1.8})
109]]
105 110
106 if "float" == func.Type then return 0.0 111 if "float" == func.Type then return 0.0
107 elseif "integer" == func.Type then return 0 112 elseif "integer" == func.Type then return 0