text stat

Discuss how to create custom stats, reports and HUD profiles and share your creations.

Moderators: WhiteRider, kraada, Flag_Hippo, morny, Moderators

text stat

Postby WaitWaitW » Tue Jun 17, 2014 5:18 am

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 :)
WaitWaitW
 
Posts: 79
Joined: Fri Aug 03, 2012 4:21 am

Re: text stat

Postby kraada » Tue Jun 17, 2014 8:31 am

Code: Select all
format('AA')
validates for me - you'd use it in the Format area when set to Expression.
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: text stat

Postby WaitWaitW » Tue Jun 17, 2014 4:24 pm

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?
WaitWaitW
 
Posts: 79
Joined: Fri Aug 03, 2012 4:21 am

Re: text stat

Postby kraada » Wed Jun 18, 2014 7:35 am

You need single quotes around that P -- it's a one character string and thus needs to be quoted.
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: text stat

Postby WaitWaitW » Wed Jun 18, 2014 9:36 am

thanks again! :)
WaitWaitW
 
Posts: 79
Joined: Fri Aug 03, 2012 4:21 am

Re: text stat

Postby WaitWaitW » Wed Jun 18, 2014 9:50 am

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?)
WaitWaitW
 
Posts: 79
Joined: Fri Aug 03, 2012 4:21 am

Re: text stat

Postby kraada » Wed Jun 18, 2014 10:38 am

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
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: text stat

Postby WaitWaitW » Wed Jun 18, 2014 11:22 am

Yay it works! TY very much! :)
WaitWaitW
 
Posts: 79
Joined: Fri Aug 03, 2012 4:21 am

Re: text stat

Postby WaitWaitW » Fri Jun 27, 2014 6:00 pm

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"

:(
WaitWaitW
 
Posts: 79
Joined: Fri Aug 03, 2012 4:21 am

Re: text stat

Postby kraada » Sat Jun 28, 2014 8:21 am

Can you post a screenshot of the error that also shows what you're trying to validate?
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Next

Return to Custom Stats, Reports and HUD Profiles

Who is online

Users browsing this forum: No registered users and 29 guests

cron