1. Please make sure you are posting in the correct place. Server ads go here and modpack bugs go here

error attempt to index (a nil value) computer craft

Discussion in 'General FTB chat' started by julien vitoux, Aug 9, 2019.

  1. julien vitoux

    julien vitoux New Member

    Hello guys i have a probleme because i a the error attempt to index (a nil value) and i don't see my fault
    pls help me quickly


    I want your help pls
  2. lenscas

    lenscas Over-Achiever

    2 things that would make it easier to help:

    First the pastebin is set to private, meaning that no one can see the code.
    Second: It would help if you also say at which line it occurs.

    Something that may help you spot the error, assuming it isn't already solved. The error means that somewhere in your code you think that you have a table and try to use it like one when in actual fact it isn't even a value.
    local a = {example : 1}
    print(a.example)  // prints 1
    local b = nil
    print(b.example) //this gives the above error
    The cause can be a simple misspelling, wrong number of parameters to a function that wants a table or thinking something is in scope when its not.

Share This Page