Page 1 of 1

PRR IP Cbet. Format extension.

PostPosted: Wed Apr 06, 2011 5:19 pm
by marvelage
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?

Re: PRR IP Cbet. Format extension.

PostPosted: Wed Apr 06, 2011 6:09 pm
by kraada
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?

Re: PRR IP Cbet. Format extension.

PostPosted: Wed Apr 06, 2011 6:28 pm
by marvelage
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.

Re: PRR IP Cbet. Format extension.

PostPosted: Wed Apr 06, 2011 6:41 pm
by marvelage
I think I have found the problem 5 min ago. There was a mistake in one column. Thanks for response, appreciate it)).

Re: PRR IP Cbet. Format extension.

PostPosted: Thu Apr 07, 2011 3:45 am
by WhiteRider
Thanks for the update – I'm glad to hear you got it working.