July 12, 20187 yr 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
July 12, 20187 yr 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.
July 12, 20187 yr 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, 20187 yr by apa
July 12, 20187 yr 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.
July 12, 20187 yr Author 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, 20187 yr by Luke Reading
July 12, 20187 yr Author 2 minutes ago, Chris said: Thanks boss, i should still keep the first if else in the on loop tho?. Just not the methods?
July 12, 20187 yr 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.
Create an account or sign in to comment