Juggles Posted November 22, 2016 Share Posted November 22, 2016 (edited) These are the notes I wrote down when I was first learning java.These are just the basics and should help set a foundation for you. It is crucial to understand these basics because they are used in every script. I took these notes while doing Code Academy ** On the Order of Operation part, it is best to use parenthesis instead of following the guidelines because it can get confusing. Edited November 23, 2016 by Juggles 15 Quote Link to comment Share on other sites More sharing options...
Orange Posted November 22, 2016 Share Posted November 22, 2016 just go ahead and paste all of ur notes 3 Quote Link to comment Share on other sites More sharing options...
Alek Posted November 22, 2016 Share Posted November 22, 2016 Most programmers avoid order of operations by forcing parenthesis to ensure the order is correct. Typical mistake:bool1 || bool2 && bool3 Some people might think it's evaluating (bool1 || bool2) && bool3 when it's really bool1 || (bool2 && bool3). 6 Quote Link to comment Share on other sites More sharing options...
Juggles Posted November 22, 2016 Author Share Posted November 22, 2016 (edited) Most programmers avoid order of operations by forcing parenthesis to ensure the order is correct. Typical mistake: bool1 || bool2 && bool3 Some people might think it's evaluating (bool1 || bool2) && bool3 when it's really bool1 || (bool2 && bool3). Yeah I agree. I'll edit the notes and post that later. When I was first learning how to script, I didn't fully understand how to do order of operation so using the parenthesis is a better way to do it. Edited November 22, 2016 by Juggles Quote Link to comment Share on other sites More sharing options...
Bamboozled Posted November 23, 2016 Share Posted November 23, 2016 Glad you're sharing your knowledge with the community. Never goes unnoticed Quote Link to comment Share on other sites More sharing options...
Satire Posted December 22, 2016 Share Posted December 22, 2016 This should indeed help beginners. I had a sheet similar to this when I was learning c++. It is very helpful! 1 Quote Link to comment Share on other sites More sharing options...
DrDu Posted January 24, 2017 Share Posted January 24, 2017 how do u type or on a normal keyboard? Quote Link to comment Share on other sites More sharing options...
WindPower Posted February 5, 2017 Share Posted February 5, 2017 On 1/23/2017 at 10:38 PM, DrDu said: how do u type or on a normal keyboard? On a "regular" keyboard, directly above the enter button: Hold shift + \ = |. Or = ||. Quote Link to comment Share on other sites More sharing options...
gerfz Posted February 11, 2017 Share Posted February 11, 2017 helped alot! Quote Link to comment Share on other sites More sharing options...
Tempest Posted February 11, 2017 Share Posted February 11, 2017 Is learning the fundamentals enough to start scripting? I have already learnt this and some basic GUI too. Quote Link to comment Share on other sites More sharing options...
MalteseFalcon Posted February 26, 2017 Share Posted February 26, 2017 Thanks very much! looks helpful Quote Link to comment Share on other sites More sharing options...
Juggles Posted February 26, 2017 Author Share Posted February 26, 2017 49 minutes ago, MalteseFalcon said: Thanks very much! looks helpful No problem Hope it helps Quote Link to comment Share on other sites More sharing options...
IamBot Posted February 26, 2017 Share Posted February 26, 2017 Being a student, I know those notes are sure going to help beginners. Quote Link to comment Share on other sites More sharing options...
Swizzbeat Posted February 27, 2017 Share Posted February 27, 2017 Expanding upon what @Alek mentioned short circuit operators are fantastic for making code optimizations in conditions that depend on or's. Do your lightweight checks first (boolean state, etc.) so if any evaluate to true the condition will terminate early and not have to do any of your more robust calculations. They're also a great place to chain calls together vs nested if's. Example RuneScape script case case: !isPlayerInCombat() && playerHealth() > 20 && ((distanceToTarget > 10 && stepTowardsTarget) || attackTarget) would be a perfect one statement generic method for attacking an entity that could be called each script poll. 1 Quote Link to comment Share on other sites More sharing options...
Antonio Kala Posted July 29, 2017 Share Posted July 29, 2017 replying to this so I can find the thread later 1 Quote Link to comment Share on other sites More sharing options...