This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Qustion's profile picture

Attempt to call nil

Started by Qustion, 17 August 2016 - 05:08 PM
Qustion #1
Posted 17 August 2016 - 07:08 PM
Hello,

I would like to display a button on a screen.
To do this I have written following code: http://pastebin.com/z9XJbyux
My problem is that it allways tells me ":9 attempt to call nil".
I am clueless to why it tells me this.
I would very much appriciate a sollution.

Thank you
Lyqyd #2
Posted 17 August 2016 - 07:33 PM
Lua is case-sensitive. Use mon.setCursorPos() instead.
Qustion #3
Posted 18 August 2016 - 05:52 AM
Thank you, that helped

I have added the rest of the code I had initially planned, however I have encountered an error that I had solved before my topic post.
It tells me in line 7 "attempt to index ? (a number value).
I have researced this Error, but I cannot explain why it is telling me this, my idea was that it isn't passing out the string from the table.
Heres the code : http://pastebin.com/x4S9X6me
I would be very thankful about some help.
Lyqyd #4
Posted 18 August 2016 - 08:46 PM
Get rid of the for loop and use _table.xMin instead of v.xMin, etc.
Qustion #5
Posted 19 August 2016 - 05:23 AM
I have added the part of the code, I had initially planned to use, but now I am recieving a different Error.
I haven't found any solutions to ":7: attempt to index ? (a number) and I would be very thankful for some help

http://pastebin.com/x4S9X6me
Edited on 19 August 2016 - 06:06 AM
Lyqyd #6
Posted 19 August 2016 - 10:34 PM
Get rid of the for loop and use _table.xMin instead of v.xMin, etc.
Qustion #7
Posted 21 August 2016 - 10:15 AM
soory that I copied that, I was wondering why I couldn't post anything because I didn't reload the page so I posted again, thank you for the help