diff options
Diffstat (limited to 'server/src/vm/vm.lua')
-rw-r--r-- | server/src/vm/vm.lua | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/server/src/vm/vm.lua b/server/src/vm/vm.lua index 4aa3fd3c..df2cd234 100644 --- a/server/src/vm/vm.lua +++ b/server/src/vm/vm.lua @@ -291,7 +291,10 @@ function mt:callLibrary(func, values, source, lib) if rtn.type == 'boolean' or rtn.type == 'number' or rtn.type == 'integer' or rtn.type == 'string' then func:setReturn(i, self:createValue(rtn.type, self:getDefaultSource())) end - func:getReturn(i):setType(rtn.type or 'any', 1.0) + local value = func:getReturn(i) + if value then + value:setType(rtn.type or 'any', 1.0) + end end end end |