Help Find Error In LISP?

Discussion in 'AutoCAD' started by MiD-AwE, Feb 25, 2005.

  1. MiD-AwE

    MiD-AwE Guest

    I'm working on what should be a simple code to calculate gallons of water in a swimming pool as part of title block automation. Below is what I have so far. The problem appears after entering the average depth the lisp stops and displays the following error:

    ; error: bad argument type: numberp: "5"
    Code:
    (DEFUN CALGAL (/ CMD SA AD GAL)
    (SETQ CMD (getvar "CMDECHO"))
    (SETVAR "CMDECHO" 0)
    (SETQ SA (getstring "\nWhat is the POOL's SURFACE AREA: "))
    (SETQ AD (getstring "\nWhat is the POOL's AVERAGE DEPTH: "))
    (SETQ GAL (* (* AD 7.5) SA))
    (COMMAND SA "" GAL)
    (SETVAR "CMDECHO" CMD)
    (PRINC)
    )
    Please, help I'm at a loss.
    Thank you.
     
    MiD-AwE, Feb 25, 2005
    #1
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.