Ulysses
General => Developers Corner => Topic started by: LuaTenshi on August 16, 2013, 09:23:45 PM
-
Lets say I have a table like this...
James = {"James", "loves", "pie", "but", "JamminR", "likes", "jam"}
What would I do to make this output in order with a 1 second delay between each output.
As in...
"James"
-- One Second Later
"loves"
-- One Second Later
"pie"
-- You get the idea...
The above used to be easy to do but long ago an update to the timers broke my method of doing that. Any ideas?
-
No idea what's broken in timers.
If simple.timer works;
for i, blah in ipairs( James )
timer.Simple ( i, <print/msg/say/whatever code to display>( blah ) )
end
-
No idea what's broken in timers.
If simple.timer works;
for i, blah in ipairs( James )
timer.Simple ( i, <print/msg/say/whatever code to display>( blah ) )
end
Here is the problem though...
Attempt to concatenate local 'v' (a nil value)
for i, v in ipairs( James ) do
timer.Simple ( i, function(v) print("Value: " .. v) end)
end
-
take v out of your function()
You're not passing anything through it, you don't need it.
At that point it's trying to find what v is equal to when it goes to print the value using the value that is passing through the function (which doesn't exist)
-
take v out of your function()
You're not passing anything through it, you don't need it.
At that point it's trying to find what v is equal to when it goes to print the value using the value that is passing through the function (which doesn't exist)
Thanks MrPresident, I knew I was missing some thing...