anderiel Posted July 19, 2016 Share Posted July 19, 2016 So i wanted to make myself a bat file that would use the command line arguments to start my script. The command i am using: java -jar "osbot 2.4.75.jar" -login anderiel:password -bot email:pass:pin -script "scriptname":abcd and obviously in my command all the passwords and stuff are correct, these are placeholders for security reasons. The thing is, when i run this i get this response from console: Starting local script with name: scriptname [DEBUG][07/19 10:28:29 dop.]: Injected 2 field list filters [DEBUG][07/19 10:28:29 dop.]: Injected 2 field filters [DEBUG][07/19 10:28:29 dop.]: Injected 2 method list filters [DEBUG][07/19 10:28:29 dop.]: Injected 3 method filters and then nothing happens, osbot wont start up. My script does not use the console parameters, so i tried versions of scriptname: or just scriptname, these resulted in: Script settings are incorrect, unable to load automatically! Usage: -script scriptid:params OR scriptname:params [DEBUG][07/19 10:34:06 dop.]: Injected 2 field list filters [DEBUG][07/19 10:34:06 dop.]: Injected 2 field filters [DEBUG][07/19 10:34:06 dop.]: Injected 2 method list filters [DEBUG][07/19 10:34:06 dop.]: Injected 3 method filters and osbot loaded but stopped at login screen. I am not sure what is wrong, i checked the scriptname for typos, but there are none. Quote Link to comment Share on other sites More sharing options...
Jesus Posted July 19, 2016 Share Posted July 19, 2016 (edited) It says script settings are incorrectedit: I believe you have to put the script id not the name (I may be wrong) Just what I can gather from http://osbot.org/forum/topic/100378-osbot-24678-bot-farming-made-easy-cli-finished/ edit 2: Afaik, to find the script id, you start the bot normally, start the script and in the logger it should say something like [DEBUG][07/19 04:48:05 PM]: Loading script id : 698 edit 3: nevermind, you can use the name (It might be case sensitive, im unsure) Edited July 19, 2016 by Jesus Quote Link to comment Share on other sites More sharing options...
anderiel Posted July 19, 2016 Author Share Posted July 19, 2016 It says script settings are incorrect edit: I believe you have to put the script id not the name (I may be wrong) Just what I can gather from http://osbot.org/forum/topic/100378-osbot-24678-bot-farming-made-easy-cli-finished/ I am using a local script, therefore i should be entering name. 1 Quote Link to comment Share on other sites More sharing options...
Jesus Posted July 19, 2016 Share Posted July 19, 2016 I am using a local script, therefore i should be entering name. yeh just saw that, make sure that it is written exactly, (make sure there is no case sensitive errors and maybe try putting _ if there are any spaces in the name) Quote Link to comment Share on other sites More sharing options...
anderiel Posted July 19, 2016 Author Share Posted July 19, 2016 yeh just saw that, make sure that it is written exactly, (make sure there is no case sensitive errors and maybe try putting _ if there are any spaces in the name) i copied it right from the script manifest, using _ instead of space makes it start the client, but not the script (because of wrong scriptname probably). Its weird, basically when i have everything right, nothing happens, and when i have an error in the script part the client starts. Could it be possible that my script uses something in onstart that would make it crash silently? The script works fine when started manually. Quote Link to comment Share on other sites More sharing options...
Alek Posted July 19, 2016 Share Posted July 19, 2016 Add a "-debug 5005" to it. If it's immediately closing out still, add a "pause" on the next line in your batch/shell script. 1 Quote Link to comment Share on other sites More sharing options...
anderiel Posted July 19, 2016 Author Share Posted July 19, 2016 (edited) Add a "-debug 5005" to it. If it's immediately closing out still, add a "pause" on the next line in your batch/shell script. that resulted in this: Starting local script with name: scriptname Debug enabled on port 5005 [DEBUG][07/19 06:20:52 odp.]: Injected 2 field list filters [DEBUG][07/19 06:20:52 odp.]: Injected 2 field filters [DEBUG][07/19 06:20:52 odp.]: Injected 2 method list filters [DEBUG][07/19 06:20:52 odp.]: Injected 3 method filters In debug mode! Listening for transport dt_socket at address: 5005 Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 6 at org.osbot.BotApplication.main(gr:194) Bot exited with code : 1 but only when the script name is correct, if it is incorrect i get this: Starting local script with name: scriptname Debug enabled on port 5005 [DEBUG][07/19 06:26:34 odp.]: Injected 2 field list filters [DEBUG][07/19 06:26:34 odp.]: Injected 2 field filters [DEBUG][07/19 06:26:34 odp.]: Injected 2 method list filters [DEBUG][07/19 06:26:34 odp.]: Injected 3 method filters In debug mode! Listening for transport dt_socket at address: 5005 Stealth injection class-filter enabled! [DEBUG][07/19 06:26:35 odp.]: OSBot is now ready! [INFO][07/19 06:26:36 odp.]: Loaded 3 RS accounts! Loaded 5 local scripts and 1 SDN scripts. [INFO][07/19 06:26:38 odp.]: Welcome to OSBot 2.4.75! [INFO][07/19 06:26:38 odp.]: Updated injection hooks for client revision : 118! [DEBUG][Bot #1][07/19 06:26:38 odp.]: Initializing stealth injection bot... [INFO][Bot #1][07/19 06:26:39 odp.]: Downloading latest RS2 old-school client parameters... [DEBUG][Bot #1][07/19 06:26:40 odp.]: Injected bot reference into client! [DEBUG][Bot #1][07/19 06:26:41 odp.]: Injected world accessors! [DEBUG][Bot #1][07/19 06:26:41 odp.]: Injected 35 class and 318 field accessors! [DEBUG][Bot #1][07/19 06:26:41 odp.]: Injected canvas! [DEBUG][Bot #1][07/19 06:26:41 odp.]: Injected 4 model update calls! [DEBUG][Bot #1][07/19 06:26:41 odp.]: Injected 12 definition calls! [DEBUG][Bot #1][07/19 06:26:41 odp.]: Injected 16 definition transformation calls! [DEBUG][Bot #1][07/19 06:26:42 odp.]: Injected random.dat patch for bot #1 [DEBUG][Bot #1][07/19 06:26:42 odp.]: Injected 3 tooltip callbacks! [DEBUG][Bot #1][07/19 06:26:42 odp.]: Injected 2 config callbacks! [DEBUG][Bot #1][07/19 06:26:43 odp.]: Injected 18 head message callbacks! [DEBUG][Bot #1][07/19 06:26:43 odp.]: Injected 2 chatbox message callbacks! [DEBUG][Bot #1][07/19 06:26:44 odp.]: Injected 23 draw skip points! [DEBUG][Bot #1][07/19 06:26:46 odp.]: Injected 0 hit splat callbacks! [DEBUG][Bot #1][07/19 06:26:46 odp.]: Injected 3 equipment callbacks! [DEBUG][Bot #1][07/19 06:26:46 odp.]: Injected 2 login return code callbacks! [DEBUG][Bot #1][07/19 06:26:47 odp.]: Injected 24 analysis callbacks! [DEBUG][Bot #1][07/19 06:26:48 odp.]: Loading RS world : 362 [INFO][Bot #1][07/19 06:26:48 odp.]: Initializing 35 API modules... [INFO][07/19 06:26:48 odp.]: Started bot #1 Starting script... Could not find script : scriptname edit: Ok, i did some experimenting now and changed my script name to a single word instead of two words(from something like Anderiels Script to AnderielsScript). Now it started working, guess the problem is with local scripts that have multiple words in their name. Edited July 19, 2016 by anderiel Quote Link to comment Share on other sites More sharing options...