Fixed a typo in the init.lua
Typo caused the library to crash during load due to forgetting the ".." in the getVersion function
This commit is contained in:
parent
65a4dfa9c9
commit
62aa9120a8
@ -209,7 +209,7 @@ function multi:getChildren()
|
|||||||
return self.Mainloop
|
return self.Mainloop
|
||||||
end
|
end
|
||||||
function multi:getVersion()
|
function multi:getVersion()
|
||||||
return multi.Version[1].."."..multi.Version[2].."."multi.Version[3]
|
return multi.Version[1].."."..multi.Version[2].."."..multi.Version[3]
|
||||||
end
|
end
|
||||||
--Processor
|
--Processor
|
||||||
function multi:getError()
|
function multi:getError()
|
||||||
|
|||||||
33
test.lua
33
test.lua
@ -1,27 +1,8 @@
|
|||||||
package.path="?/init.lua;"..package.path
|
package.path="?/init.lua;"..package.path
|
||||||
require("multi.tloop")
|
require("multi.all")
|
||||||
a=0
|
process=multi:newProcess() -- this can also load a file, to keep things really organized, I will show a simple example first then show the same thing being done within another file.
|
||||||
inc=1 -- change to 0 to see it not met at all, 1 if you want to see the first condition not met but the second and 2 if you want to see it meet the condition on the first go.
|
process:newTLoop(function(self)
|
||||||
loop=multi:newTLoop(function(self)
|
print("Looping every second...")
|
||||||
print("Looping...")
|
end,1)
|
||||||
a=a+inc
|
process:Start() -- starts the process
|
||||||
if a==14 then
|
multi:mainloop() -- start the main runner
|
||||||
self:ResolveTimer("1","2","3") -- ... any number of arguments can be passed to the resolve handler
|
|
||||||
-- this will also automatically pause the object that it is binded to
|
|
||||||
end
|
|
||||||
end,.1)
|
|
||||||
loop:SetTime(1)
|
|
||||||
loop:OnTimerResolved(function(self,a,b,c) -- the handler will return the self and the passed arguments
|
|
||||||
print("We did it!",a,b,c)
|
|
||||||
end)
|
|
||||||
loop:OnTimedOut(function(self)
|
|
||||||
if not TheSecondTry then
|
|
||||||
print("Loop timed out!",self.Type,"Trying again...")
|
|
||||||
self:ResetTime(2)
|
|
||||||
self:Resume()
|
|
||||||
TheSecondTry=true
|
|
||||||
else
|
|
||||||
print("We just couldn't do it!") -- print if we don't get anything working
|
|
||||||
end
|
|
||||||
end)
|
|
||||||
multi:mainloop()
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user