Mad Nomad
April 14th, 2022, 16:30
The Module.setModulePermissions() function does not seem to be working for me. I've tried everything I can think of, but calling it just doesn't seem to have any impact.
Here's some sample code which I called onInit and also I tried calling it onDesktopInit too in case that might be impacting it. But both have the same result.
Module.setModulePermissions("5E Items Effects Coding - Weapons",true,true) ;
Debug.chat(Module.getModuleInfo("5E Items Effects Coding - Weapons"))
It prints the below info. As you can see, it doesn't seem to change the loading parameter. It also seems to be using a string for loading paremeter, but the value is bFalse. I suspect that might have something to do with it. Maybe some associated function is looking for a boolean value but you are storing a string?
{ s'replaces' = { }, s'loaded' = bTRUE, s'author' = s'Rob Twohy (rob2e)', s'anyflag' = bFALSE, s'installed' = bTRUE, s'permission' = s'allow', s'name' = s'5E Items Effects Coding - Weapons', s'category' = s'5E Rob Twohy (rob2e) Modules', s'loading' = bFALSE, s'intact' = bTRUE, s'displayname' = s'5E Items Effects Coding - Weapons' }
I tried using the Module.activate() function for client as well, but I get same result.
Module.activate("5E Items Effects Coding - Weapons") ;
Here's some sample code which I called onInit and also I tried calling it onDesktopInit too in case that might be impacting it. But both have the same result.
Module.setModulePermissions("5E Items Effects Coding - Weapons",true,true) ;
Debug.chat(Module.getModuleInfo("5E Items Effects Coding - Weapons"))
It prints the below info. As you can see, it doesn't seem to change the loading parameter. It also seems to be using a string for loading paremeter, but the value is bFalse. I suspect that might have something to do with it. Maybe some associated function is looking for a boolean value but you are storing a string?
{ s'replaces' = { }, s'loaded' = bTRUE, s'author' = s'Rob Twohy (rob2e)', s'anyflag' = bFALSE, s'installed' = bTRUE, s'permission' = s'allow', s'name' = s'5E Items Effects Coding - Weapons', s'category' = s'5E Rob Twohy (rob2e) Modules', s'loading' = bFALSE, s'intact' = bTRUE, s'displayname' = s'5E Items Effects Coding - Weapons' }
I tried using the Module.activate() function for client as well, but I get same result.
Module.activate("5E Items Effects Coding - Weapons") ;