Author Topic: where did you learn torque  (Read 2092 times)

Anyway torquescript is based on C#, not C or C++
technically i guess it'd be 'based off' C++ since it's created in C++

technically i guess it'd be 'based off' C++ since it's created in C++

That does not mean it is based of C++, just that it is interpreted using C++.

That's a horrible place to start.

Anyway torquescript is based on C#, not C or C++

Saying TorqueScript is based off something like C# is misleading considering the fact that it's an entirely broken language anyway that makes no sense.

For example, %client.player.setVelocity() takes a string even though it should take three ints or a vector3.

Multiline comments (/**/) are broken and don't even work.

Arrays are fake and are just as redundant as doing: $var_0, $var_1 etc.

You use different operators to compare strings than other variables even though TorqueScript tried to make everything a string.

It's all silly.

For example, %client.player.setVelocity() takes a string even though it should take three ints or a vector3.
It does take three values, they're just in a string. There's nothing wrong with that.
Multiline comments (/**/) are broken and don't even work..
It's only a minor inconvenience, nothing more
Arrays are fake and are just as redundant as doing: $var_0, $var_1 etc.
Yes, but I don't see a problem with that. It's helpful for inserting variables into variables
You use different operators to compare strings than other variables even though TorqueScript tried to make everything a string.
There is == for values and $= for strings, it's not difficult.

It does take three values, they're just in a string. There's nothing wrong with that.
There's everything wrong with that. Why do you think in low-level languages like C++ and even in higher level ones like C# there are different types of variables, ie: int x = 5; or char y = 'f';? Better yet, there's a reason they exist. It's so you can store that type of value. Strings are meant to be strings of characters, words basically. What if someone were to rewrite SetVelocity, and I were to do %client.player.setVelocity("ephialtes");?

If it took three ints, this wouldn't be an issue.

It's only a minor inconvenience, nothing more
Saying it's an inconvenience doesn't excuse the fact that one of the most basic features is broken.

Yes, but I don't see a problem with that. It's helpful for inserting variables into variables
I don't even understand what you're trying to say here. Do you even know what an array is and the point of it?

From what I've interpreted from that, you're saying it's helpful to not have arrays to use them for what arrays are used for.

What.
There is == for values and $= for strings, it's not difficult.
Yes but it shouldn't be there at all.
« Last Edit: April 07, 2012, 10:58:53 PM by Kaphonaits »

The point of my post was to say that torque is different, but not necessarily broken.
There's everything wrong with that. Why do you think in low-level languages like C++ and even in higher level ones like C# there are different types of variables, ie: int x = 5; or char y = 'f';? Better yet, there's a reason they exist. It's so you can store that type of value. Strings are meant to be strings of characters, words basically. What if someone were to rewrite SetVelocity, and I were to do %client.player.setVelocity("ephialtes");?

If it took three ints, this wouldn't be an issue.
I'm not sure what point you are trying to make in the last bit of this quote. Obviously doing %client.player.setVelocity("ephialtes"); will not work, the same way it wouldn't work if you put in 3 strings instead of ints into a rewritten setVelocity function. Strings are not necessarily words, they can be three ints separated by spaces, which is what is used here.

As for the arrays, sorry I was not clear. You are, of course, correct that arrays are fake in torque. I don't know much of other coding languages so if there is something I'm missing I apologize. What I was trying to was was that these pseudoarrays are still usable and helpful, despite not being actual arrays. You can place variables inside of variables like %letter[%index] or similar scenarios.

The point of my post was to say that torque is different, but not necessarily broken.I'm not sure what point you are trying to make in the last bit of this quote. Obviously doing %client.player.setVelocity("ephialtes"); will not work, the same way it wouldn't work if you put in 3 strings instead of ints into a rewritten setVelocity function. Strings are not necessarily words, they can be three ints separated by spaces, which is what is used here.
 or similar scenarios.
Why do you continually deny that I'm saying that you should use integer variables instead of string variables for a function that can only take numbers?

Saying strings aren't meant for words is like saying languages aren't meant for communication. The reason integer/float/double variables exist is for numbers. The reason strings exist is for multiple characters.

You can place variables inside of variables like %letter[%index] or similar scenarios.
That's not a variable inside a variable. That's not even close.

That's a horrible place to start.

Anyway torquescript is based on C#, not C or C++
It's not based on C#. Not in the slightest.

Well then never mind. I could have sworn it's been said that it was

It's not based on C#. Not in the slightest.
C# only means you can open them


Looking at other scripts - seeing what does what, trial and error and searching on the forums.