I have an issue that each time I run the script containing resetProfile() function, it is executed multiple time for unknown reason.
To isolate the issue, I have tried unstalling all additional script packages but the issue remains.
resetProfile being loaded multiple times
Re: resetProfile being loaded multiple times
As you put the resetProfile() in an script in the Script-manager you even can call yourself lucky it didn't create a infinite loop as resetProfile() is
also reloading the scripts.
To use resetProfile() properply try to use the command lua resetProfile() in the commandline.
Edit:
Just noticed that it isn't mentioned in the Mudlet wiki.
Made a small note in the wiki.
also reloading the scripts.
To use resetProfile() properply try to use the command lua resetProfile() in the commandline.
Edit:
Just noticed that it isn't mentioned in the Mudlet wiki.
Made a small note in the wiki.
Re: resetProfile being loaded multiple times
Remember that a script is run every time you click on it or save it.
Re: resetProfile being loaded multiple times
I can run the reset by issuing alias, but the new problem is that different from scripts, all aliases wil not be reloaded. So that I have to save one by one to get them reactive
Re: resetProfile being loaded multiple times
A solution for that would be to make a tempAlias in you scripts.
I do it like this
Like this the command rp would call resetProfile() and it works all the time
I do it like this
Code: Select all
resetProfilAlias = resetProfileAlias or tempAlias("^rp$",[[resetProfile()]])
Re: resetProfile being loaded multiple times
you are right, I create tempAlias for all permAlias at the begining of my script as a work around