www.webdeveloper.com
Results 1 to 1 of 1

Thread: Math calculations with java script

  1. #1
    Join Date
    Nov 2002
    Location
    Kentucky
    Posts
    9

    Question Math calculations with java script

    Ok let me give you a bit of back ground. A friend of mine from the net gave me a bit of javascript to use in a project I am working on for a game called Dungeons and Dragons. It is a monster stat block calculator/creater.

    I have managed to get most of the fields I want in place but last night I ran into a snag. The page takes info that is put into the fields and adds them together using the formula given in the Monster Manual to come up with the BaB or Base Attack Bonus. Now for every attack after the first the BaB is at -5. Now the part that does the math I don't know much about and can't figure out how to make the second part show up as 5 less then the first one.

    The line that prints the BaB looks like write(" ",formR.edtBAB.value,"<br>");

    I'm including the file in txt format for anyone wishing to look at it.
    Attached Files Attached Files
    Last edited by eeyore; 11-27-2002 at 02:22 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles