Pe/\/duluM Posted April 25, 2013 Posted April 25, 2013 I'm trying to create a training gamemode, like on TG. It is working so far, every script of the map get's loaded and started successful. But it fails at stopping it. Though there is no function to stop everything inside the whole loaded script (xy = loadstring(FILE_TEXT)) and not everything get's unloaded on nil-ling the loadstring variable, I wanted to ask if there is some other way to achieve loading and saving the scripts? Greetings, Pe/\/duluM
50p Posted April 25, 2013 Posted April 25, 2013 Stopping the resource is the only way to unload scripts.
Pe/\/duluM Posted April 25, 2013 Author Posted April 25, 2013 Mh... I already thought about doing one resource as a temporary script-cache, but if that one would get started, every player would get those scripts loaded...
Fabioxps Posted April 25, 2013 Posted April 25, 2013 Mh... I already thought about doing one resource as a temporary script-cache,but if that one would get started, every player would get those scripts loaded... I sent you a pm
Pe/\/duluM Posted April 26, 2013 Author Posted April 26, 2013 I still can't get the unloading to work... Though my method seems crap, cause (as I said) the music and stuff of all players would get restarted
Pe/\/duluM Posted April 26, 2013 Author Posted April 26, 2013 I'm doing wrappers and all that kindof stuff already, but the functions still exist and run (e.g. flying meteors of Unseen Galaxy)
GTX Posted April 26, 2013 Posted April 26, 2013 Put all objects into a table and then when you trigger an unload function, destroy them with destroyElement.
Pe/\/duluM Posted April 26, 2013 Author Posted April 26, 2013 Objects get deleted fine, already did that. I said, the Functions are still running
denny199 Posted April 26, 2013 Posted April 26, 2013 GTX, he don't know a way to unload the scripts what he has loaded with "loadstring"
Pe/\/duluM Posted April 26, 2013 Author Posted April 26, 2013 GTX, he don't know a way to unload the scripts what he has loaded with "loadstring" Exactly that! Thank you denny ^^ But still, I don't know how to unload it correctly
GTX Posted April 26, 2013 Posted April 26, 2013 As I said, do the wrappers. Show your code. Did you override addEventHandler too?
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