Game Development Community

CH2- Having trouble Understanding Code

by Sheldon Manny Felipe · in Torque Game Engine · 08/31/2007 (5:31 pm) · 2 replies

Function main()
$banacost=1.15;
$applecost=0.55
$numapples=3;
$numbananas=1;

$numfruit=0;
$total=0;

print(*cost of bananas(ea.):$"@$bananacost);
print("cost of apples(ea.):$"@$applecost);
print("number of bananas:"@$numbananas);
print("number of apples:"@$numapples);
I dont understand the last parts of these lines. [:$"@$bananacost);]

#1
08/31/2007 (6:01 pm)
It is a string concantenation that converts numbers to strings. TorqueScript Quick Reference
#2
05/06/2008 (7:18 am)
It is kind of like a compound word in grammer. It would print on the screen cost of banannas(ea):$1.15 instead of printing the words bananacost it printed the number u asained to it sry for the typo.