Javier Posted January 21, 2013 Share Posted January 21, 2013 Hello friend , I' have a problem with my script. Error: expected near close at line 1 '{' and my script local climas = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21 } function clima() setWeather ( climas [ math.random ( #climas ) ] ) end addEventHandler("onResourceStart", resourceRoot, clima) setTimer(clima, 1000, 0) Link to comment
Sparrow Posted January 21, 2013 Share Posted January 21, 2013 I think it's better if you use: function clima() setWeather(math.random(1, 21)) end addEventHandler("onResourceStart", resourceRoot, clima) setTimer(clima, 1000, 0) Link to comment
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