Mad 86 Share Posted June 13, 2016 Edit: Solved by @ ... I wasn't setting the context correctly because "this" was referring to a null context since it wasn't created yet. So you have to do, this.registerMethodContext(Instance.getInstance().getMethodContext().getClient()) Im trying to execute a script through another script by calling the onLoop, but no matter what I do, it throws NPE's on pretty much every API call. These include widgets, opening tabs, interactions, etc. I assume it has something to do with the context not being correct or something, so i tried setting the global context of the client in the onStart of the script being executed from the main script using: Client.getClient().setContext(this); Instance.getInstance().setMethodContext(this); But that didnt do anything. I have my controller here, where I add my script:Which is just a regular script... Then my loop where it finds the current valid script from my set of scripts that I added in the on start and executes it. I'm not really sure why it wouldn't work, any suggestions? Link to comment Share on other sites More sharing options...
Nuclear Nezz 2012 Share Posted June 13, 2016 glad I could help buddy. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.