function coding - help

Discussion in 'JavaScript' started by askscript, Nov 10, 2008.

  1. #1
    I try to do this coding when i key in the planet name, it will alert its diameter and it distance from the sun. But i can't do it. ( Keeps giving me the "incorrect star input" alert. So i put a for loop but it still not doing right. Care to help?


     
    askscript, Nov 10, 2008 IP
  2. rene7705

    rene7705 Peon

    Messages:
    233
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #2
    if (star == planet)

    not

    if (star == planet )
     
    rene7705, Nov 10, 2008 IP
  3. askscript

    askscript Member

    Messages:
    59
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #3
    i have changed that, it is not that problem
     
    askscript, Nov 10, 2008 IP
  4. rene7705

    rene7705 Peon

    Messages:
    233
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #4
    with what argument are you calling your presult() function?
    your argument is case-sensitively checked, too.. so the capitals have to be in the correct place..
     
    rene7705, Nov 10, 2008 IP
  5. askscript

    askscript Member

    Messages:
    59
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #5
    opps sorry i forgotten to add in the other part of the script. Here it is:

     
    askscript, Nov 10, 2008 IP