Aha! I think I see it.
Smarty cannot use non integer variables in a math equation. Since some of your variables are not assigned like w=$ordered1 then it returns null. "null" doesn't add up and breaks the math equation.
You can handle this several ways by assigning a value of 0 to ordered1 etc, or by using |default:0 which is my preference.
Consider this code:
PHP Code:
{if $ordered1 ne '' or $ordered5 ne '' or $ordered6 ne '' or $ordered7 ne ''}
You bought {$ordered1|default:0} boats, {$ordered5|default:0} life jackets, {$ordered6|default:0} anchors, and {$ordered7|default:0} paddles!
You get {math equation="(( w * 9 ) + ( z * 18 ) + ( y * 18 ) + ( z * 18 ))" w=$ordered1|default:0 x=$ordered5|default:0 y=$ordered6|default:0 z=$ordered7|default:0} points!
{else}
Go get a boat, and some $*%# life jackets, loser!
{/if}
BTW, you also have a small typo: x=$ordered
z5