Page 1 of 1

PT4 custom stat doesnt work properly

PostPosted: Sun Apr 08, 2012 10:26 am
by camelino
Hi

Could you pls explain why this

if ((cnt_vpip / (cnt_hands - cnt_walks) * 100) > 25
AND ((cnt_f_cbet_def_action_fold / cnt_f_cbet_def_opp) * 100) < 75
AND ((cnt_t_cbet_def_action_fold / cnt_t_cbet_def_opp) * 100) < 65
AND cnt_t_cbet_def_opp > 1
,'STA'
,'')

returns 'STA' (for station) on opponents who have VPIP > 25 but have never faced even a flop cbet and therefore could not fullfill any of the other 3 conditions?
What did i do wrong?

PS: I post this here cause there are no sub categories in PT4 forum (might wanna change that)

Re: PT4 custom stat doesnt work properly

PostPosted: Mon Apr 09, 2012 4:15 am
by WhiteRider
If they haven't had an opportunity then the other expressions would actually give an error (because you can't divide by zero) but PT4 handles this by making the result zero. Therefore the middle two expressions will be true.
I would expect it to fail on the condition "cnt_t_cbet_def_opp > 1", though. However, we just fixed a bug related to that database field, but that change hasn't been released yet.
When the next version comes out you will need to reimport the hands, but this expression should then work correctly. If you have problems with it in the next release please let us know.