Zodiac Dev Posted August 26, 2015 Share Posted August 26, 2015 (edited) This turns out in error as it says it is not declared...I am remaking an old zammy wine script and i need help making it compatable to the newest osbot this.magicHandler.castSpell(Spells.FALADOR_TELEPORT, null); Spells.FALADOR_TELEPORT //this gives the error here This has a "!= undefined for arg types" if ((this.dist < 20) && /* this part is the error */ (this.settings[0] != 0)) { /* this part is the error */ g2.fill(p.getPolygon(this.bot)); } Edited August 26, 2015 by run3warfar3 Quote Link to comment Share on other sites More sharing options...
Joseph Posted August 26, 2015 Share Posted August 26, 2015 (edited) If you class extends script. Be aware that we have a settings global field. So if you made an array of ints named settings rename it and you should not get an error Edited August 26, 2015 by Joseph Quote Link to comment Share on other sites More sharing options...
Zodiac Dev Posted August 26, 2015 Author Share Posted August 26, 2015 (edited) This is an old script i need to make it new xD And i found the "settings" and it's just a boolean private boolean[] settings = { true }; If you class extends script. Be aware that we have a settings global field. So if you made an array of ints named settings rename it and you should not get an error I would also like the spell shit more, can you help me with that? EDIT: FIXED ALL SPELL SHIT THANKS TO TACO SHACK I NEED THE SETTING STUFF NOW Edited August 26, 2015 by run3warfar3 Quote Link to comment Share on other sites More sharing options...
Amusing Posted August 26, 2015 Share Posted August 26, 2015 This is an old script i need to make it new xD And i found the "settings" and it's just a boolean private boolean[] settings = { true };I would also like the spell shit more, can you help me with that?EDIT: FIXED ALL SPELL SHIT THANKS TO TACO SHACK I NEED THE SETTING STUFF NOW Quote Link to comment Share on other sites More sharing options...
Joseph Posted August 26, 2015 Share Posted August 26, 2015 Common dawg it doesn't work because one it's a boolean. All you have to do is check what value it returns. True or false. On top of that there is no point is using an a ray of boolean if all you have in the Array is just one boolean. It just defeats the purpose of an array. Quote Link to comment Share on other sites More sharing options...
Bobrocket Posted August 26, 2015 Share Posted August 26, 2015 You can just do (boolean) 0 In booleans, 0 = off = false and 1 = on = true (right?) Quote Link to comment Share on other sites More sharing options...
Zee Best Posted August 26, 2015 Share Posted August 26, 2015 Why are you using the 'this' keyword on every reference to a method within the class? The only time you should use 'this' is when you write a method and the parameter names are the same as variables in your class, or when you've got multiple constructors and you want to return a different one. Quote Link to comment Share on other sites More sharing options...