You are not connected. Please login or register

View previous topic View next topic Go down  Message [Page 1 of 1]

At line 24 I get an error that says Uncaught SyntaxError: Unexpected identifier

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);   */      
         
         
      
   }

View user profile

Super Chivas

avatar
Moderator
I did some research, and I found out that, you have a variable that you're trying to reference that hasn't been declared. To make sure, you pass all the variables that you're trying to use into the template.

Hope this somewhat helps. Not so good at javaScript or coding.

View user profile http://reviewforums.webmasterforos.com/

View previous topic View next topic Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum

 

Free forum | © PunBB | Free forum support | Contact | Report an abuse | Free forum