PDA

View Full Version : XenoBot Bug - Non-Issue [Other] walkerListener + module



Nakuu
01-09-2015, 10:42 PM
Bug ReportOperating System:
Other Short Description:
walkerListener + module Behaviors: Feature error

Indepth Description:
Let's take this lua script as an example:

Module('x-x', function(module)
print("x")
wait(2000)
print(y)
end)

registerEventListener(WALKER_SELECTLABEL, "onLabel")

function onLabel(label)
end

When a module which has wait(x) inside runs in the same file as walkerListener it takes 'x' more time to handle labels. Is it intended? I know I could use module:Delay instead but it doesn't let me do what I want.

If it's not a bug then sorry for reporting ;)

Spectrus
01-10-2015, 12:25 AM
Bug ReportOperating System:
Other Short Description:
walkerListener + module Behaviors: Feature error

Indepth Description:
Let's take this lua script as an example:

Module('x-x', function(module)
print("x")
wait(2000)
print(y)
end)

registerEventListener(WALKER_SELECTLABEL, "onLabel")

function onLabel(label)
end

When a module which has wait(x) inside runs in the same file as walkerListener it takes 'x' more time to handle labels. Is it intended? I know I could use module:Delay instead but it doesn't let me do what I want.

If it's not a bug then sorry for reporting ;)

It's not a bug. When the script hits the wait it literally halts everything for the given time. It can't process the label until the wait is complete. If you need help with making your code work with module:Delay then make a thread in the Script Request & Support section.

:*