Jump to content

Javascript Skill Calculator Problem


htideswell

Recommended Posts

Recently Bujjo owner of the runescape fansite bujjo's palace allowed me to use his runescape skill calculator for my Runescape Fansite you can view his calculator

 

 

 

 

 

 

 

Here

 

 

 

 

 

 

 

as you can see it works great but it's one big calculator for all of the skills (well non-members skills)so i decided to seperate them into seperate calcultors and as seen as i don't know practically anything about javascript this was really annoying to do i managed to get the first calculator finished which you can see

 

 

 

 

 

 

 

Here

 

 

 

 

 

 

 

this calcultor works fine and i updated it to use all the newest ore's and item available to mine.This is where the problem(s) comes as you know when smithing you can smelt/smith or smelt and smith so i have a problem as i don't know much about javascript i could not get this calculator to work as you can see

 

 

 

 

 

 

 

Here

 

 

 

 

 

 

 

please view the source of this page if you know anything about javascipt and try and fix it or tell me the problem.Also i have another problem i decided to skip the smithing calculator and try another one (cooking) and this one did not work either (i belive it is the same problem) you can see this calcultor

 

 

 

 

 

 

 

Here

 

 

 

 

 

 

 

so if you know what is wrong with the calculators please help.as i really need to get them finished for my site.

Link to comment
Share on other sites


  •  
     
     
    [*:1n63omqp]Get rid of the silly for loop to try to figure out which skill is used - you already know that since you separated them
     
     
     
    [*:1n63omqp]Get rid of the subsequent checks if the skill number is correct.
     
     
     
    [*:1n63omqp]Alternatively, use if (skill == 5) instead of 4, since the for loop does i+1 ;)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.