1 Uncaught SyntaxError: Unexpected identifier Help Wed Nov 23, 2011 11:08 am
MrMario
At line 24 I get an error that says Uncaught SyntaxError: Unexpected identifier
Any ideas?
Any ideas?
- Code:
function MiniCooper(metal_type)
{
var FortKnox, ag_fn, pt_fn, al_fn, cu_fn, Metal_AG, Metal_PT, Metal_AL, Metal_CU, metal_Size;
// Finding the size of a FortKnox bar
FortKnox = (7 * 3.625 * 1.75).toFixed(3);
// Calucating each metal with the FortKnox standard size
if (metal_type == "ag"){
metal_Size = (0.379 * FortKnox).toFixed(3);
}
else if (metal_type == "pt"){
metal_Size = (0.098 * FortKnox).toFixed(3);
}
else if (metal_type == "al"){
metal_Size = (0.773 * FortKnox).toFixed(3);
}
else (metal_type == "cu"){
metal_Size = (0.324 * FortKnox).toFixed(3);
}
return metal_Size;
/*// Calucating each metal and seeing how much space is taken in the 2 door Mini Cooper
Metal_AG = (41472.000 - ag_fn).toFixed(3);
Metal_PT = (41472.000 - pt_fn).toFixed(3);
Metal_AL = (41472.000 - al_fn).toFixed(3);
Metal_CU = (41472.000 - cu_fn).toFixed(3);
// ** 65 gold bars for a 2 door **
// ** 74 gold bars for a 4 door **
// Calucating each metal and seeing how much space is taken in the 4 door Mini Cooper
Metal_AG = (56678.400 - ag_fn).toFixed(3);
Metal_PT = (56678.400 - pt_fn).toFixed(3);
Metal_AL = (56678.400 - al_fn).toFixed(3);
Metal_CU = (56678.400 - cu_fn).toFixed(3); */
}