So I made a program to create a simple text, and it called nil. Can I have some help?
if true then
local monitor = peripheral.wrap ("back")
monitor.setTextscale(5)
monitor.setCursorPos(1,1)
monitor.write ("Boo")
end
Thanks for the help.
Attempt To Call Nil.
Started by NegativeZero6484, Jun 07 2014 11:16 AM
3 replies to this topic
#1
Posted 07 June 2014 - 11:16 AM
#2
Posted 07 June 2014 - 08:01 PM
I forgot the term for it, but first word lower letters and then first letter capitalized for every word afterwards is considered conventional variable naming in Lua. The issue here is you did not do this with monitor.setTextScale(), as im sure the error number pointed to that lines aswell(3). Please include the full error next time, and use code tags.
Edited by CometWolf, 07 June 2014 - 08:01 PM.
#4
Posted 08 June 2014 - 12:26 AM
NegativeZero6484, on 07 June 2014 - 11:16 AM, said:
So I made a program to create a simple text, and it called nil. Can I have some help?
"attempt to call nil" usually means you tried to call an inexistant function.
Check whether you made any mistake in the function's name, if you didn't then it's
probably because the function was not defined at the line where this error occured.
As CometWolf said, It's probably because you did not capitalize the 'S' in "setTextScale".
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











