String columns for HUD

Forum for users that want to write their own custom queries against the PT database either via the Structured Query Language (SQL) or using the PT3 custom stats/reports interface.

Moderator: Moderators

String columns for HUD

Postby lkastel » Thu Sep 09, 2010 9:00 pm

Is it possible to create a new string column and set its value to a string literal?

Also, is it possible to concatenate two strings together in the column expression, and/or to convert a number to a string?

I'm trying to create a stat in my HUD which will check whether the values of several mathematical expressions are within certain ranges, and then set itself to the value of the interesting one, like this: <Description> : <Value>
lkastel
 
Posts: 19
Joined: Tue Sep 07, 2010 11:21 pm

Re: String columns for HUD

Postby WhiteRider » Fri Sep 10, 2010 4:18 am

You can do all of this in the Statistic, specifically in the Format Expression.

Have a look at this tutorial.

You might find the "format" section useful, but probably "if" is what you want.
You can append plain strings using + but you'll probably find that "format" is more useful.
"format_number" gives you control over how a number is displayed.
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK


Return to Custom Stats, Reports, and SQL [Read Only]

Who is online

Users browsing this forum: No registered users and 0 guests