villr Posted January 3, 2011 Share Posted January 3, 2011 So i have some problems with my script im making. The problem is when that things in script im making are "finished" with what they do i want to restart the script but it dont work here is code EDIT: randoms is name of script i wanna restart! function restartthisscript() local allResources = getResources() for index, res in (randoms) do if getResourceState(res) == "running" then restartResource(res) end end end and here its the part to restart it its more but thats just that setTimer(restartthisscript, 6000, 1) Whats the problem? Link to comment
Aibo Posted January 3, 2011 Share Posted January 3, 2011 function restartthisscript() local res = getResourceFromName("randoms") if getResourceState(res) == "running" then restartResource(res) end end Link to comment
villr Posted January 3, 2011 Author Share Posted January 3, 2011 thx that helped me veeeery mutch 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