Page 1 of 2

Color ranges with Strings

PostPosted: Fri Sep 19, 2008 6:30 am
by js2002
Hi,

I built the Stat "Hands played with k-notation" and my color ranges don´t work correct, because when cnt_hands > 999 the Stat takes the value / 1000 and appends a 'k'. So its no "int" anymore, so a "string" The defined color range ( doesnt matter wheater defined in "configure stats" or in the hud setup) match if the value stays below 1000. When it get > 999 the text of the stat ist white again.

Re: Color ranges with Strings

PostPosted: Fri Sep 19, 2008 6:43 am
by WhiteRider
I would have thought it would use the value in the stat's 'Value Expression' field and ignore the formatting.
Ah, are you adding the "k" in the Column you build, rather than in the Statistic?

Re: Color ranges with Strings

PostPosted: Fri Sep 19, 2008 7:35 am
by js2002
WhiteRider wrote:I would have thought it would use the value in the stat's 'Value Expression' field and ignore the formatting.
Ah, are you adding the "k" in the Column you build, rather than in the Statistic?


if( cnt_hands>999 , format( '{1}k' , format_number((cnt_hands / 1000) , 1 , false , false)) , cnt_hands )

No not in the column. I use standard cnt_hands. I see that i have the exp above in the definition of the stat and the same in the format. I ll try to get it out there a see if it still works.

Re: Color ranges with Strings

PostPosted: Fri Sep 19, 2008 8:17 am
by js2002
deleted the exp and let cnt_hands in there but the color conditions / ranges dont work !

http://rapidshare.com/files/146573229/H ... 3stat.html could you test at your PC ?
maybe it doesn´t work because I updated the value and PT3 dit not regocnize that.

Re: Color ranges with Strings

PostPosted: Fri Sep 19, 2008 12:16 pm
by WhiteRider
I think you will need to at least re-start the HUD to get it to notice the change - and possibly rebuild the cache, although I don't think this should be necessary.

Re: Color ranges with Strings

PostPosted: Fri Sep 19, 2008 3:24 pm
by js2002
...did this before I posted.

Re: Color ranges with Strings

PostPosted: Fri Sep 19, 2008 5:37 pm
by WhiteRider
Sorry - I kind of skim-read your reply - I've downloaded your stat now, and I'll have a play with it tomorrow.

Re: Color ranges with Strings

PostPosted: Sat Sep 20, 2008 6:52 am
by WhiteRider
OK, I'm seeing the same as you.
I'll create a ticket about this - I think it ought to be using the 'Value Expression' when evaluating colour ranges (and anything else for that matter).

Re: Color ranges with Strings

PostPosted: Sat Sep 20, 2008 8:44 am
by js2002
WhiteRider wrote:OK, I'm seeing the same as you.

thx


I'll create a ticket about this - I think it ought to be using the 'Value Expression' when evaluating colour ranges (and anything else for that matter).

Huh? baby english plz!


Re: Color ranges with Strings

PostPosted: Sat Sep 20, 2008 9:57 am
by WhiteRider
I just meant this:

WhiteRider wrote:I would have thought it would use the value in the stat's 'Value Expression' field and ignore the formatting.


It seems to be using the value from the Format tab (which includes the formatting, so uses the string), rather than the Definition tab (which doesn't).