Thought I had all the kinks out but here is one more.

Trying to calculate the total scores. Tried several different things but can’t seem to get it to work. Not very good with math, definitely not when putting it in code.

[php]// calculate the score total
$scores_string = ‘’;
foreach ($scores as $s) {
$scores_string .= $s . ‘|’;
}
$scores_string = substr($scores_string, 0, strlen($scores_string)-1);[/php]

You can’t calculate a string, it would have to converted to an interger first, then you can do like what you did for the max rolls in the other thread.

Sponsor our Newsletter | Privacy Policy | Terms of Service