); te"> Syntax error trying to use ML tags | Torque Game Engine | Forums | Community | GarageGames.com

Game Development Community

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 );
}

#1
10/10/2007 (5:10 pm)
The tags ( and ) need to be in quotes.

also, is not a tag.
you need to use blah blah instead.
#2
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
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
10/10/2007 (6:01 pm)
textHit.setText( "<spush><b>" [b]@[/b] $leader.dam @" damage <spop>");

Don't forget the "@" . . .


Aun.
Mayan Software