Author Topic: How to display the item name in a player's slot?  (Read 2118 times)

May not want to cut out the isObject. If some add-on decides to clear the tool by setting the slot to -1 it'll mess up.

But then again, something similar goes for the rest of this premature optimization.
May not want to define it in the actual if test. If somebody is trying to learn TorqueScript or is trying to modify the code they might get wrong ideas about the language or mess it up.

But then again, something similar goes for the rest of this premature optimization.
May not want to define it in the actual if test. If somebody is trying to learn TorqueScript or is trying to modify the code they might get wrong ideas about the language or mess it up.
Yeah true. People get too obsessed with the idea of optimization in Torque and end up making a hideous mess of their code with virtually no improvement at all. Worst offenders are the ones who compact everything into one line and remove all the white space (who deserve to have their add-on making licenses revoked) but there are other examples. Most people will never run into a situation where sacrificing readability will give a noticeable performance increase.

I don't think he cares anymore. I made the add-on for him.
true ;p