Results 1 to 2 of 2
  1. #1
    spots of fire is offline Member
    Join Date
    Jan 2010
    Rep Power

    Angry help with switches

    I have a problem with a script.
    a piece of it goes like this:

    10 or 11 = "fall leaves"
    12 or 1 = "snow"
    4 or 5 = "rain"

    Java Code:
    var d = new Date();
    var curr_month = d.getMonth();
    if var curr_month == 1 then do function()
    the function is snow.
    i cant get to rain or leaves yet but i know they should work.
    but the switch im using doesn't work and i cant pin down the problem.
    can someone help me?

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Blog Entries
    Rep Power


    First thing you need to learn is that java is not javascript, in fact far from it, and while you are asking a javascript question, this is a java forum. For a more helpful answer, Google for a javascript forum and ask your question there. Best of luck.

Similar Threads

  1. how to convert from switches to methods
    By peacehope in forum New To Java
    Replies: 4
    Last Post: 03-27-2009, 12:33 AM
  2. Help with switches
    By Daniel in forum New To Java
    Replies: 2
    Last Post: 07-04-2007, 08:37 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts