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

Error Help.

Started by TheCaptainSly, 12 October 2014 - 03:10 PM
TheCaptainSly #1
Posted 12 October 2014 - 05:10 PM
I have a question about a particular error I'm receiving. The error is as followed:
Line: 7
Error: Bad argument #1 to '?' (number expected, got nil).

Line 7 is version = "0.1". It has no reason to pass an error. I have no idea why an error is being thrown my way and if anyone can explain it to me that would be fantastic.

I've also tried deleting the line and the error still shows up. If you need to see my whole code I'll post a pastebin of it otherwise I'll leave it out.

Thank you in advance.
Saldor010 #2
Posted 12 October 2014 - 09:31 PM
Please post your code. It's always just a good habit to get into when you're asking a question in Ask a Pro.
Dragon53535 #3
Posted 12 October 2014 - 09:34 PM
My best guess is that the full error says a different file than the one you're using, which means that some call to an API is what's messing up.

Also do post your code.
Edited on 12 October 2014 - 07:35 PM
TheCaptainSly #4
Posted 13 October 2014 - 05:40 PM
Thanks for the replys. It seemed that I've fixed it randomly. Apparently there is certain times when I can use colors.blue and the number 2048. I'll still post my code for you to see where the error occured. It was on the function dlContextMenu1() It couldn't use the colors so I had to create variables for them.
Dragon53535 #5
Posted 13 October 2014 - 09:03 PM
You don't have to use the number code, you could easily use the colors api. colors.blue colors.red colors.orange all do what you're doing, however it's already made. API.