Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - poorplayer

Pages: [1]
1
Help Me / Re: Formula problem
« on: August 10, 2008, 11:41:09 AM »
I think u need just to know php to understand what i wrote. Anyway look at this pick



ie.
if the buyin is 100(2) and player are 35(3) and your final position is 3°(100) u should get 600 points

AxBxC

2
Help Me / Formula problem
« on: August 10, 2008, 09:46:39 AM »
Hi, before all i need to say thanks for this great program!!! I just downloaded it and i'm amazing! The sofware is fully customizable and very simple to understand. Anyway i'm getting some troubles with formulas, i made a php script to calculate the point but i've not understood how translate it.

php script:
Quote
$buy_in = $_GET['a'];

$players = $_GET['b'];

$posizione = $_GET['c'];


if ( $buy_in <= 50) {

   $buy_in = 1 ;

}

elseif ( $buy_in <= 110) {

   $buy_in = 2 ;

}

elseif ( $buy_in <= 220) {

   $buy_in = 3 ;

}

elseif ( $buy_in <= 330) {

   $buy_in = 4 ;

}

elseif ( $buy_in >= 331) {

   $buy_in = 6 ;

}

if ( $players <= 20) {

   $players = 2 ;

}

elseif ( $players <= 30) {

   $players = 2.5 ;

}

elseif ( $players <= 40) {

   $players = 3 ;

}

elseif ( $players <= 50) {

   $players = 3.5 ;

}

elseif ( $players >= 51) {

   $players = 5 ;

}


if ( $posizione == 1 ) {

   $posizione = 150 ;

}

elseif ( $posizione == 2) {

   $posizione = 120 ;

}

elseif ( $posizione == 3) {

   $posizione = 100 ;

}

elseif ( $posizione == 4) {

   $posizione = 80 ;

}

elseif ( $posizione == 5) {

   $posizione = 60 ;

}

elseif ( $posizione == 6) {

   $posizione = 50 ;

}

elseif ( $posizione == 7) {

   $posizione = 40 ;

}

elseif ( $posizione == 8 ) {

   $posizione = 30 ;

}

elseif ( $posizione == 9) {

   $posizione = 20 ;

}

elseif ( $posizione == 10) {

   $posizione = 10 ;

}

      
elseif ( $posizione <= 20) {

   $posizione = 5 ;

}

elseif ( $posizione <= 30) {

   $posizione = 4 ;

}

elseif ( $posizione <= 40) {

   $posizione = 3 ;

}

elseif ( $posizione <= 50) {

   $posizione = 2 ;

}

elseif ( $posizione >= 51) {

   $posizione = 1 ;

}

      
$total = $buy_in * $players * $posizione ;


I've converted the script in this way:

Quote
if ( br <= 50), assign ("buyin",1) &&
if ( br <= 110), assign ("buyin",2)&&
if ( br <= 220),assign ("buyin",3) &&
if ( br <= 330),assign ("buyin",4) &&
if ( br >= 331),assign ("buyin",6) &&

if ( n <= 20), assign ("player",2)&&
if ( n <= 30), assign ("player",2.5)&&
if ( n <= 40), assign ("player",3)&&
if ( n <= 50), assign ("player",3.5)&&
if ( n <= 51), assign ("player",5)&&

if ( r == 1 ), assign ("pos",150)&&
if ( r == 2), assign ("pos",120)&&
if ( r == 3), assign ("pos",100)&&
if ( r == 4), assign ("pos",80)&&
if ( r == 5), assign ("pos",60)&&
if ( r == 6), assign ("pos",50)&&
if ( r == 7), assign ("pos",40)&&
if ( r == 8 ), assign ("pos",30)&&
if ( r == 9), assign ("pos",20)&&
if ( r == 10), assign ("pos",10)&&
if ( r <= 20), assign ("pos",5)&&
if ( r <= 30), assign ("pos",4)&&
if ( r <= 40), assign ("pos",3)&&
if ( r <= 50), assign ("pos",2)&&
if ( r >= 51), assign ("pos",1)&&

buyin * player * pos

Unfortunatly the script doesn't works and i cant understand why, i'm a very beginner coder :'(.
Could someone help me? thanks in advanced

Pages: [1]