PRR IP Cbet. Format extension.

Forum for users that want to write their own custom queries against the PT database either via the Structured Query Language (SQL) or using the PT3 custom stats/reports interface.

Moderator: Moderators

PRR IP Cbet. Format extension.

Postby marvelage » Wed Apr 06, 2011 5:19 pm

I want make custom stat Cbet IP in 3bet pot. I've done it already but have a question. In "Format expression" field I put the following code:
format( '{1}%({2}/{3})',
format_number(
(cnt_prr_ip_f_cbet / cnt_prr_ip_f_cbet_opp) * 100
,0,false,false),
cnt_prr_ip_f_cbet,
cnt_prr_ip_f_cbet_opp)

As you see i dont check the case when cnt_prr_ip_f_cbet_opp = 0. Is it correct or I should make a check for this case?

Also an error occurs during housekeeping "Devision by zero". Is this error associated with the mistake in format expression above?
marvelage
 
Posts: 10
Joined: Mon Mar 28, 2011 6:56 am

Re: PRR IP Cbet. Format extension.

Postby kraada » Wed Apr 06, 2011 6:09 pm

Housekeeping shouldn't touch this function. However, building stats in that fashion should no longer be necessary - if you format the stat's value expression as:

(cnt_prr_ip_f_cbet / cnt_prr_ip_f_cbet_opp) * 100

Then you can use the "Show Times and Opportunities" option on the Statistics Properties tab in the HUD and see the times and opportunities directly that way.

The housekeeping error is likely to do with the columns themselves - how do you have them defined?
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: PRR IP Cbet. Format extension.

Postby marvelage » Wed Apr 06, 2011 6:28 pm

To tell truth I have a lot of custom stats. I am trying now to find the problem of that error. Here is my PT backup file without databases. http://rapidshare.com/files/456233405/backup3.zip

Erorr is 'Devision by zero'. The only case i use a devision in columns looks like holdem_hand_player_detail.amt_p_raise_facing / holdem_limit.amt_bb.
marvelage
 
Posts: 10
Joined: Mon Mar 28, 2011 6:56 am

Re: PRR IP Cbet. Format extension.

Postby marvelage » Wed Apr 06, 2011 6:41 pm

I think I have found the problem 5 min ago. There was a mistake in one column. Thanks for response, appreciate it)).
marvelage
 
Posts: 10
Joined: Mon Mar 28, 2011 6:56 am

Re: PRR IP Cbet. Format extension.

Postby WhiteRider » Thu Apr 07, 2011 3:45 am

Thanks for the update – I'm glad to hear you got it working.
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK


Return to Custom Stats, Reports, and SQL [Read Only]

Who is online

Users browsing this forum: No registered users and 0 guests