diff options
Diffstat (limited to 'LuaSL/src/LSL.lua')
-rw-r--r-- | LuaSL/src/LSL.lua | 13 |
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 |
95 | end | 95 | end |
96 | 96 | ||
97 | function mt.callAndReturn(name, ... ) | 97 | function mt.callAndReturn(name, ...) |
98 | print("mt.callAndReturn(" .. name .. "(" .. args2string(true, ...) .. "))") | 98 | luaproc.sendback(name .. "(" .. args2string(true, ...) .. ")") |
99 | end | 99 | end |
100 | 100 | ||
101 | function mt.callAndWait(name, ... ) | 101 | function 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 |