Results 1 to 9 of 9

Thread: Error when loading LSP file - error: bad argument type: fixnump: nil

  1. #1
    100 Club
    Join Date
    2005-06
    Location
    Idaho, USA
    Posts
    184
    Login to Give a bone
    0

    Default Error when loading LSP file - error: bad argument type: fixnump: nil

    I am at a complete loss.. I got an error message when i loaded my .lsp file.

    error: bad argument type: fixnump: nil

    What is this???????
    I have a lot of functions defined and setq's above all this, but I believe this is where things are having problems.

    Code:
     ;load dialog box
      (setq DCL_ID(load_dialog "plat-test.dcl"))
       (if(not(new_dialog "Plat" DCL_ID))(exit))
      ;start dialog box
      (start_dialog)
    ;if cancel button pressed
      (action_tile "cancel" "(setq diag1)(done_dialog)")
      (action_tile "accept" "(setq diag2)(saveVars)(done_dialog)")
    
      
    (SETQ OLDSNAP(GETVAR "OSMODE"))
    (SETVAR "CMDECHO" 0
            "OSMODE" 0)
    
    ;setup for layout tabs  
    ;number of layout tabs needed
    (SETQ S1 (getint "\nHow many sheets? (do not include signature sheets)"))
    
    ;entering loop for layout tabs
    (repeat (s1)(command "._layout" "_n" """")))
    
    
    (unload_dialog DCL_ID)(princ))

  2. #2
    AUGI Addict kennet.sjoberg's Avatar
    Join Date
    2002-05
    Posts
    1,707
    Login to Give a bone
    0

    Default Re: Error when loading LSP file - error: bad argument type: fixnump: nil

    (s1) <-- this is how to call and run a function
    remove the paranthesis to use the value inside S1

    : ) Happy Computing !

    kennet

  3. #3
    100 Club
    Join Date
    2005-06
    Location
    Idaho, USA
    Posts
    184
    Login to Give a bone
    0

    Default Re: Error when loading LSP file - error: bad argument type: fixnump: nil

    Quote Originally Posted by kennet.sjoberg
    (s1) <-- this is how to call and run a function
    remove the paranthesis to use the value inside S1

    : ) Happy Computing !

    kennet
    Sorry but it didn't work.

  4. #4
    Administrator Opie's Avatar
    Join Date
    2002-01
    Location
    jUSt Here (a lot)
    Posts
    9,096
    Login to Give a bone
    0

    Default Re: Error when loading LSP file - error: bad argument type: fixnump: nil

    Quote Originally Posted by eleonard
    Sorry but it didn't work.
    Did you remove the parenthesis from around the s1 variable?

    Code:
    ;entering loop for layout tabs
    (repeat s1(command "._layout" "_n" """")))
    If you have a technical question, please find the appropriate forum and ask it there.
    You will get a quicker response from your fellow AUGI members than if you sent it to me via a PM or email.
    jUSt

  5. #5
    Member
    Join Date
    2005-12
    Posts
    2
    Login to Give a bone
    0

    Default Re: Error when loading LSP file - error: bad argument type: fixnump: nil

    Quote Originally Posted by Opie
    Did you remove the parenthesis from around the s1 variable?

    Code:
    ;entering loop for layout tabs
    (repeat s1(command "._layout" "_n" """")))
    there is still an extra right parenthesis...
    otherwise seems ok

  6. #6
    Administrator rkmcswain's Avatar
    Join Date
    2004-09
    Location
    Earth
    Posts
    9,803
    Login to Give a bone
    0

    Default Re: Error when loading LSP file - error: bad argument type: fixnump: nil

    Quote Originally Posted by gyula_58
    there is still an extra right parenthesis...
    otherwise seems ok
    Have you loaded and ran your code in VLIDE? If so, check the "error trace". This will tell you exactly where the error is occuring.
    R.K. McSwain | CAD Panacea |

  7. #7
    AUGI Addict kennet.sjoberg's Avatar
    Join Date
    2002-05
    Posts
    1,707
    Login to Give a bone
    0

    Default Re: Error when loading LSP file - error: bad argument type: fixnump: nil

    Quote Originally Posted by gyula_58
    there is still an extra right parenthesis...
    otherwise seems ok
    Woo! Hoo! my 1st post
    Welcome to the forum, eagle eye

    : ) Happy Computing !

    kennet

  8. #8
    I could stop if I wanted to
    Join Date
    2003-11
    Posts
    277
    Login to Give a bone
    0

    Default Re: Error when loading LSP file - error: bad argument type: fixnump: nil

    Hi eleonard,
    Your code should change,like this
    Code:
    ;--------------<snip>---------------------
    ;setup for layout tabs  
    ;number of layout tabs needed
    (SETQ S1 (getint "\nHow many sheets? (do not include signature sheets)"))
    
    ;entering loop for layout tabs
    (repeat
      s1                              ; change from (s1) to s1
      (command "._layout" "_n" """")
      )
    )                                  ; remove this close parentheis
    Quote Originally Posted by eleonard
    I am at a complete loss.. I got an error message when i loaded my .lsp file.

    error: bad argument type: fixnump: nil

    What is this???????
    I have a lot of functions defined and setq's above all this, but I believe this is where things are having problems.

    Code:
     ;load dialog box
      (setq DCL_ID(load_dialog "plat-test.dcl"))
       (if(not(new_dialog "Plat" DCL_ID))(exit))
      ;start dialog box
      (start_dialog)
    ;if cancel button pressed
      (action_tile "cancel" "(setq diag1)(done_dialog)")
      (action_tile "accept" "(setq diag2)(saveVars)(done_dialog)")
    
      
    (SETQ OLDSNAP(GETVAR "OSMODE"))
    (SETVAR "CMDECHO" 0
            "OSMODE" 0)
    
    ;setup for layout tabs  
    ;number of layout tabs needed
    (SETQ S1 (getint "\nHow many sheets? (do not include signature sheets)"))
    
    ;entering loop for layout tabs
    (repeat (s1)(command "._layout" "_n" """")))
    
    
    (unload_dialog DCL_ID)(princ))

  9. #9
    100 Club
    Join Date
    2005-06
    Location
    Idaho, USA
    Posts
    184
    Login to Give a bone
    0

    Default Re: Error when loading LSP file - error: bad argument type: fixnump: nil

    Thanks I will give that a try. I quit working on it yesterday after I got such a headache I couldn't even think.

Similar Threads

  1. Error: bad argument type: FILE "r"
    By shell2712 in forum AutoLISP
    Replies: 0
    Last Post: 2013-09-04, 08:29 PM
  2. error: bad argument type: numberp: nil
    By U.Rackharrow in forum AutoLISP
    Replies: 2
    Last Post: 2010-03-05, 01:01 PM
  3. Replies: 4
    Last Post: 2009-05-22, 05:21 AM
  4. Autolisp error bad argument type: fixnump: nil
    By arubus1977 in forum AutoCAD Customization
    Replies: 1
    Last Post: 2009-05-13, 03:09 PM
  5. Replies: 3
    Last Post: 2006-12-11, 08:31 PM

Posting Permissions

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