function return after(some time)
Posted: Tue Mar 14, 2017 05:25
Is it possible to make a function return a value after some seconds?
I mean if i write something like this:
Then the str is first returned and then printed, but is it possible to print it first and then return?
I mean if i write something like this:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
local str = "some string"
minetest.after(3.5, function(str)
print(str)
end, str)
return str
Then the str is first returned and then printed, but is it possible to print it first and then return?