Syntax error trying to use ML tags
by Nicolai Dutka · in Torque Game Engine · 10/10/2007 (5:06 pm) · 5 replies
This is my first ever attempt at using ML tags. I made sure my text object was a 'GuiMLTextCtrl'. I am getting a syntax error when trying to compile this script:
function showDamage()
{
textHit.setText( <b> $leader.dam @" damage" </b>);
textHit.setVisible("true");
schedule( 1500, 0, hideDamage );
}
#2
I am thinking it has something to do with ending the quotes and then starting them again, but I really need that variable in there.
I tried this and it worked well:
EDIT: This did not work so well. It set my text to say, " damage ".
So how do I get it to do the first one without errors? I need the whole thing in bold including the variable...
10/10/2007 (5:37 pm)
I tried this and still get syntax errors:textHit.setText( "<spush><b>" $leader.dam @" damage <spop>");
I am thinking it has something to do with ending the quotes and then starting them again, but I really need that variable in there.
I tried this and it worked well:
EDIT: This did not work so well. It set my text to say, " damage ".
textHit.setText( "<spush><b> damage <spop>");
So how do I get it to do the first one without errors? I need the whole thing in bold including the variable...
#3
10/10/2007 (5:47 pm)
Well, it turns out the tag is not supported without a resource by Orion Elenzil, and that resource does not work with Torque 1.5.2, so I guess that means no bold letters for me? Well... that throws a wrench in my engine....
#4
Ok for the rest of you n00bs like me!
10/10/2007 (6:00 pm)
LOL!!Ok for the rest of you n00bs like me!
textHit.setText("<spush><font:Arial Bold:24>"@ $leader.dam @" damage <spop>");
#5
Don't forget the "@" . . .
Aun.
Mayan Software
10/10/2007 (6:01 pm)
textHit.setText( "<spush><b>" [b]@[/b] $leader.dam @" damage <spop>");
Don't forget the "@" . . .
Aun.
Mayan Software
Associate Orion Elenzil
Real Life Plus
also, is not a tag.
you need to use