marty000123 Posted March 31, 2017 Posted March 31, 2017 (edited) weather = {1, 8, 9, 19} function table.random ( theTable ) return theTable[math.random ( #theTable )] end function randomWeather() setTimer ( function() setWeather(table.random(weather)) end, 600000, 0 ) end The weather doesn't change, why? Edited March 31, 2017 by marty000123
NeXuS™ Posted March 31, 2017 Posted March 31, 2017 weather = {1, 8, 9, 19} function table.random ( theTable ) return theTable[math.random ( #theTable )] end function randomWeather() setTimer ( function() setWeather(table.random(weather)) end, 600000, 0 ) end Btw. Next time use <> tags. Spoiler
marty000123 Posted March 31, 2017 Author Posted March 31, 2017 Thanks for the quick response, but the weather still doesn't change.
NeXuS™ Posted March 31, 2017 Posted March 31, 2017 Is it getting called? function randomWeather() setTimer ( function() setWeather(table.random(weather)) end, 1000, 0 ) end randomWeather()
marty000123 Posted March 31, 2017 Author Posted March 31, 2017 I don't know why but it works, thanks!!!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now