Help with multi condition stat

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

Moderators: WhiteRider, kraada, Flag_Hippo, morny, Moderators

Help with multi condition stat

Postby camelino » Fri Aug 24, 2012 7:40 am

Hello

Again I need help with a stat, please.

What I want to accomplish is mark players (with 'GO') where these criteria is met:

Have more than 20 hands on them

and additionally ONE of the following is true:

VPIP higher than 24%
calls more flop bets than folds to them
folds less than 60% to a steal

here is what I tried

if ((cnt_hands > 20) AND ((cnt_vpip / cnt_hands > 0.24) OR (cnt_f_call > cnt_f_fold) OR (cnt_steal_def_action_fold/cnt_steal_def_opp<0.6)),'GO','')

which is not a valid expression.

am I not allowed to use AND/OR in an if expression?
I feel really stupid to not be able to do this on my own, but obv I am not.
please help
camelino
 
Posts: 75
Joined: Wed Oct 01, 2008 8:37 am

Re: Help with multi condition stat

Postby pasita » Fri Aug 24, 2012 8:09 am

Can't try these out right now but here's my 2c worth:

You should probably put an extra set of parentheses around 'cnt_vpip / cnt_hands' and 'cnt_steal_def_action_fold/cnt_steal_def_opp' (so they're calculated before the '<'). Not sure but won't hurt.

Also, in 'cnt_steal_def_action_fold/cnt_steal_def_opp'... I've seen plenty of problems with this, you should try 'cnt_steal_def_action_fold / cnt_steal_def_opp' ... whitespace seems to matter.

When you get the "This is not valid sql" warning, try opening pokertracker.log. Right at the bottom you might find some tips on why your stat/column failed.
pasita
 
Posts: 605
Joined: Tue May 06, 2008 4:05 pm

Re: Help with multi condition stat

Postby kraada » Fri Aug 24, 2012 11:35 am

You need to add a space before and after the /. This validates:

if ((cnt_hands > 20) AND ((cnt_vpip / cnt_hands > 0.24) OR (cnt_f_call > cnt_f_fold) OR (cnt_steal_def_action_fold / cnt_steal_def_opp<0.6)),'GO','')
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY


Return to Custom Stats, Reports and HUD Profiles

Who is online

Users browsing this forum: No registered users and 34 guests

cron