Page 1 of 2

text stat

PostPosted: Tue Jun 17, 2014 5:18 am
by WaitWaitW
Hi!

I am looking to build something like that :

AA AKs AQs AJs ....
AKo KK KQs KJs ....
AQo KQo KJo KTo ....

where * would mean i have seen vilain push this hand with 10+ bbs
* would mean i have seen vilain push this hand with 9 bbs max
* would mean i have seen vilain push this hand with 5 bbs max

So, first problem (I think there will be a ton lol) :
To do so, I need to use the color in stat fonction... But I don't have programmed custom stats for a while and I don't remember how to do a "text" stat...

I have tried :
- format('AA') with AA = tourney_hand_summary.id_hand=1
- if(1,format('AA') with AA = tourney_hand_summary.id_hand=1
- =AA with AA = tourney_hand_summary.id_hand=1

etc...

How do we do to have a "stat" with a text? ^^;

TY very much :)

Re: text stat

PostPosted: Tue Jun 17, 2014 8:31 am
by kraada
Code: Select all
format('AA')
validates for me - you'd use it in the Format area when set to Expression.

Re: text stat

PostPosted: Tue Jun 17, 2014 4:24 pm
by WaitWaitW
TY! :) I was sure to have already tested it, but it works now, so I must have made a mistake lol...

second problem!
I am making a stat to show if vilain has push AA with more than 10 bbs. Here is it :

sum(if[tourney_hand_player_statistics.id_holecard = 1 AND tourney_hand_player_statistics.enum_allin = P AND tourney_hand_player_statistics.flg_p_first_raise AND NOT tourney_hand_player_statistics.flg_p_3bet_def_opp AND (live_table_min_stack / live_amt_bb)>=10, 1, 0])

... But that's not a valid SQL :( Why?

Re: text stat

PostPosted: Wed Jun 18, 2014 7:35 am
by kraada
You need single quotes around that P -- it's a one character string and thus needs to be quoted.

Re: text stat

PostPosted: Wed Jun 18, 2014 9:36 am
by WaitWaitW
thanks again! :)

Re: text stat

PostPosted: Wed Jun 18, 2014 9:50 am
by WaitWaitW
next problem... (lol -_- )

The stat no more appear on the HUD...

stat:
AA -> format('AA')
color : push_AA_10bb = 0 push_AA_10bb > 0
with push_AA_10bb :
sum(if[tourney_hand_player_statistics.id_holecard = 1 AND tourney_hand_player_statistics.enum_allin = 'P' AND tourney_hand_player_statistics.flg_p_first_raise AND NOT tourney_hand_player_statistics.flg_p_3bet_def_opp AND (live_table_min_stack / live_amt_bb)>=10, 1, 0])

(when i wrote push_AA_10bb PT4 told me "This column cannot be cached. Error: Column is not cacheable" maybe it is because of that?)

Re: text stat

PostPosted: Wed Jun 18, 2014 10:38 am
by kraada
You can't refer to one column in another and you don't want to mix live data an historical data. For stack size instead use:
(tourney_hand_player_statistics.amt_p_effective_stack / tourney_blinds.amt_bb) >= 10

Re: text stat

PostPosted: Wed Jun 18, 2014 11:22 am
by WaitWaitW
Yay it works! TY very much! :)

Re: text stat

PostPosted: Fri Jun 27, 2014 6:00 pm
by WaitWaitW
hi! another problem with my text stats :

I wanted to do one for cash game, i did :

AA { format('AA') }
green if open_AA > 0
red if open_AA = 0

with open_AA
sum(if[cash_hand_player_statistics.id_holecard = 1 AND cash_hand_player_statistics.flg_p_first_raise,1,0])

But PT4 says me "color condition expression is NOT valide"

:(

Re: text stat

PostPosted: Sat Jun 28, 2014 8:21 am
by kraada
Can you post a screenshot of the error that also shows what you're trying to validate?

highfalutin