From 7dc54ed555275b23c9dd668a173a9243d22745db Mon Sep 17 00:00:00 2001 From: Coder12a <38924418+Coder12a@users.noreply.github.com> Date: Fri, 9 Nov 2018 00:54:59 -0600 Subject: [PATCH] Bug fix --- async.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/async.lua b/async.lua index 30bad4e..11b9a6a 100644 --- a/async.lua +++ b/async.lua @@ -68,7 +68,7 @@ function minetest.async.priority(resting,maxtime) end function minetest.async.iterate(from,to,func,callback) - minetest.async.create_worker(function(t,mt) + minetest.async.create_worker(function() local last_time = minetest.get_us_time() * 1000 local maxtime = minetest.async.maxtime for i = from, to do @@ -104,7 +104,7 @@ function minetest.async.foreach(array, func, callback) end function minetest.async.do_while(condition, func, callback) - minetest.async.create_worker(function(t,mt) + minetest.async.create_worker(function() local last_time = minetest.get_us_time() * 1000 local maxtime = minetest.async.maxtime while(condition) do @@ -149,7 +149,7 @@ function minetest.async.queue_task(tasks,callback) local pass_arg = {} local last_time = minetest.get_us_time() * 1000 local maxtime = minetest.async.maxtime - for index, task_func in pairs(tasks) do + for task_func, index in pairs(tasks) do local p = task_func(pass_arg) if p then pass_arg = p