+ Reply to Thread
Results 1 to 5 of 5

Thread: Nil Value Error

  1. #1
    Inactive StealthAssassin is on a distinguished road StealthAssassin's Avatar
    Join Date
    Jun 2007
    Posts
    14

    Default

    I do not know what the problem is with this exp chip i coded but the lines are validated and saved fine. The only problem is that when spawning it i get an error.

    My exp code:

    N@XyzCalc
    I@GpsX GpsY GpsZ TarX TarY TarZ
    O@Angle
    Dist = deg(root((GpsY-TarY)^2+(GpsX-TarX)^2))

    Angle = deg(atan(GpsZ-TarZ)/Dist)
    [/b]
    The error i receive:
    entities/gmod_wire_expression/init.lua:241: attempt to perform arithmetic on local 'k' (a nil value)[/b]
    If anyone know how to fix this or what i am doing wrong then please let me know asap
    Thank you all for reading.

  2. #2
    Expressionism 2.0

    Syranide has disabled reputation Syranide's Avatar
    Join Date
    Mar 2007
    Location
    Sweden
    Posts
    4,180

    Default

    "root" doesn't exist, is called "sqrt"... but you shouldn't be getting any such error.
    I'll look into it.

    Ah, that was the problem, but you should be getting -1 and not a console error, anyways, I'll fix it tomorrow when I have time.

  3. #3
    Inactive StealthAssassin is on a distinguished road StealthAssassin's Avatar
    Join Date
    Jun 2007
    Posts
    14

    Default

    "root" doesn't exist, is called "sqrt"... but you shouldn't be getting any such error.
    I'll look into it.

    Ah, that was the problem, but you should be getting -1 and not a console error, anyways, I'll fix it tomorrow when I have time.[/b]
    Thank you very much mate, much appreciated.
    Are you aware that often a wire laser error appears, It tends to happen when you lag out of switch back into game? It is something to do with view or world model. I do not have the error at the moment but when i next encounter it i will copy and paste it up here.

    Thanks for the solution to my exp chip, i didn't really notice that i use root and not 'sqrt'. So thanks!

  4. #4
    Expressionism 2.0

    Syranide has disabled reputation Syranide's Avatar
    Join Date
    Mar 2007
    Location
    Sweden
    Posts
    4,180

    Default

    I haven't made the wired laser and never looked at the code, so I do not know the cause for that and I do not know how made it either. Hopefully whoever made it will see this thread.

  5. #5
    Inactive StealthAssassin is on a distinguished road StealthAssassin's Avatar
    Join Date
    Jun 2007
    Posts
    14

    Default

    I haven't made the wired laser and never looked at the code, so I do not know the cause for that and I do not know how made it either. Hopefully whoever made it will see this thread.[/b]

    Thanks mate, my expression chip works and everything now. Thank you a lot. As for this laser error i will post it here and then provide the link to this for whom made the laser add-on.

    Error(s) with laser weapon...


    weapons/laserPointer/cl_init.lua:13: Tried to access a NULL Entity!

    er/cl_init.lua:12: attempt to call method 'GetViewModel' (a nil value)
    [/b]
    Note: This happens when one or more person(s) have the laser weapon. When one person(s) has the laser weapon this error appears whilst joining a sever, lagging out, and the occasionally time when you give yourself the weapon also whilst someone has given their selves one too.

    Thanks, Shane aka StealthAssassin

+ Reply to Thread

Similar Threads

  1. normal commands E2 error or scrip error?!?!?!!?
    By oenmaster in forum Bug Reports
    Replies: 3
    Last Post: 01-17-2009, 07:08 AM
  2. Error
    By Avengermac in forum Help & Support
    Replies: 3
    Last Post: 08-28-2007, 03:56 PM
  3. Adv Dup error
    By zeroth in forum Help & Support
    Replies: 0
    Last Post: 08-07-2007, 06:34 AM
  4. Error.
    By Azu in forum Bug Reports Archive
    Replies: 2
    Last Post: 06-10-2007, 11:10 PM
  5. CPU Error..
    By mad_sprayer in forum Help & Support
    Replies: 6
    Last Post: 03-30-2007, 04:23 PM

Bookmarks

Posting Permissions

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