How do I learn proper grammer with Torque Script
by DreamPharaoh · in General Discussion · 02/07/2009 (6:02 pm) · 5 replies
It is the TorqueScript Grammar rules that throw me off -- intimidating me to the point of not wanting to test an idea on modifying an object because the code could be good except it rarely works only because of this grammar nemesis. It seems that there is a missing bracket, colon, parenthesis, etc. Where do I learn how to write the code in the grammar expected to begin with? Every time I search I get silly examples where there are bool, void, and float variable that seem to be unneeded while writing any code. Why are these words put into the examples? Does this actually help us?
Thank you for any assistance.
About the author
If you want to learn more, please go to my website. GodsandNemesis.com.
#3
"Very beginning programmers should read some good tutorials on programming before attempting to make their way through this chapter."
I need to take classes on C++ to get hands on experience because Object oriented code just does not seem to click with me for some reason. I am going to go through the tutorials on 3dbuzz.com to see if I can pick up some of the basic rules with the brackets and parenthesis -- when to use them when not to use them etc.
02/08/2009 (2:54 pm)
I have gone through the TDN Overview before even handwriting most of the examples out. I noticed this statement"Very beginning programmers should read some good tutorials on programming before attempting to make their way through this chapter."
I need to take classes on C++ to get hands on experience because Object oriented code just does not seem to click with me for some reason. I am going to go through the tutorials on 3dbuzz.com to see if I can pick up some of the basic rules with the brackets and parenthesis -- when to use them when not to use them etc.
#4
Basically, every { has a matching } and so on, in that order. {} envelops functions, loops and switch statements. () is useful to separate parts of calculations so the reader of the code doesn't stumble.
"Thinking in C++" is a book I always recommend, as it's available for download free, and you can get it in good bookstores fairly cheap. O'Reilly also have some nice C books which can give you the foundation you need for understanding a lot of similar languages.
02/08/2009 (4:12 pm)
Your first tool should be a syntax highlighting editor which shows what braces match.Basically, every { has a matching } and so on, in that order. {} envelops functions, loops and switch statements. () is useful to separate parts of calculations so the reader of the code doesn't stumble.
"Thinking in C++" is a book I always recommend, as it's available for download free, and you can get it in good bookstores fairly cheap. O'Reilly also have some nice C books which can give you the foundation you need for understanding a lot of similar languages.
#5
02/08/2009 (4:19 pm)
Thank you Ronny I will be checking this out soon. I am getting close to finishing the main DIF objects for the town, and will need to get back into C++ for the many DIF objects. I hope this time I can start coding without being cheap and coping and pasting other peoples code all the time.
Torque Owner Nmuta Jones