Titan Rs Posted July 12, 2018 Share Posted July 12, 2018 Hi guys. Trying to make my first script by using explv 101 tutorial layout but making a chaos druid script instead. however i was making my methods but for some reason i cant understand red lines are coming up. I even copied and pasted one of explv to see if it would work and i still got red lines. any help would be appreciated 1 Quote Link to comment Share on other sites More sharing options...
Night Posted July 12, 2018 Share Posted July 12, 2018 You're missing a semicolon after your Area declaration at the top along with the Area parameters. Fix those and most of the errors should disappear. Quote Link to comment Share on other sites More sharing options...
apa Posted July 12, 2018 Share Posted July 12, 2018 (edited) 5 minutes ago, Luke Reading said: Hi guys. Trying to make my first script by using explv 101 tutorial layout but making a chaos druid script instead. however i was making my methods but for some reason i cant understand red lines are coming up. I even copied and pasted one of explv to see if it would work and i still got red lines. any help would be appreciated Line 1: missing semicolon. Whenever you have a statement, it needs a semicolon. If placing a set of curly brackets after the statement doesn't work, you know it needs a semicolon. the other ones between '(){' is because you're missing spaces between the '()' and '{'. That's just styling "errors" to make your code look pretty. The long one; missing a bracket on the left side, right after the return. Last two lines, they are erroring because you have return true, else, return true. This always returns true, make the second one return false. Edited July 12, 2018 by apa Quote Link to comment Share on other sites More sharing options...
Chris Posted July 12, 2018 Share Posted July 12, 2018 learn java first before using a osbot script tutorial Quote Link to comment Share on other sites More sharing options...
Rays Posted July 12, 2018 Share Posted July 12, 2018 6 minutes ago, Chris said: learn java first before using a osbot script tutorial This. Getting a basic understanding of Java before diving into the OSBot API is a really good idea. I reccommend getting a book on Java as these often come with some kind of exercises to get you comfortable with programming. Quote Link to comment Share on other sites More sharing options...
Chris Posted July 12, 2018 Share Posted July 12, 2018 1 Quote Link to comment Share on other sites More sharing options...
Titan Rs Posted July 12, 2018 Author Share Posted July 12, 2018 (edited) 20 minutes ago, apa said: Line 1: missing semicolon. Whenever you have a statement, it needs a semicolon. If placing a set of curly brackets after the statement doesn't work, you know it needs a semicolon. the other ones between '(){' is because you're missing spaces between the '()' and '{'. That's just styling "errors" to make your code look pretty. The long one; missing a bracket on the left side, right after the return. Last two lines, they are erroring because you have return true, else, return true. This always returns true, make the second one return false. EDIT: Found a solution Edited July 12, 2018 by Luke Reading Quote Link to comment Share on other sites More sharing options...
Titan Rs Posted July 12, 2018 Author Share Posted July 12, 2018 2 minutes ago, Chris said: Thanks boss, i should still keep the first if else in the on loop tho?. Just not the methods? Quote Link to comment Share on other sites More sharing options...
apa Posted July 12, 2018 Share Posted July 12, 2018 16 minutes ago, Chris said: Don't know how I missed that haha Quote Link to comment Share on other sites More sharing options...
Eagle Scripts Posted July 12, 2018 Share Posted July 12, 2018 As others have stated; it’s worth it to first learn java and then write scripts. If you do it the other way around your scripts are not going to be flawless and they’ll take a lot of your time, more than learning java takes. Quote Link to comment Share on other sites More sharing options...