| Blockland Forums > Modification Help |
| where did you learn torque |
| << < (5/6) > >> |
| Treynolds416:
The point of my post was to say that torque is different, but not necessarily broken. --- Quote from: Kaphonaits on April 07, 2012, 10:55:46 PM ---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. --- End quote --- 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. |
| Kaphonaits:
--- Quote from: Treynolds416 on April 07, 2012, 11:20:09 PM ---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. --- End quote --- 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. --- Quote from: Treynolds416 on April 07, 2012, 11:20:09 PM ---You can place variables inside of variables like %letter[%index] or similar scenarios. --- End quote --- That's not a variable inside a variable. That's not even close. |
| DontCare4Free:
--- Quote from: Treynolds416 on April 05, 2012, 08:39:43 PM ---That's a horrible place to start. Anyway torquescript is based on C#, not C or C++ --- End quote --- It's not based on C#. Not in the slightest. |
| Treynolds416:
Well then never mind. I could have sworn it's been said that it was |
| blockbuilder1:
--- Quote from: DontCare4Free on April 08, 2012, 07:34:47 AM ---It's not based on C#. Not in the slightest. --- End quote --- C# only means you can open them |
| Navigation |
| Message Index |
| Next page |
| Previous page |