Posted 10 July 2013 - 07:41 AM
Hello,
I'm getting the error '65:attempted to call nil' even if the function in that line exists.
I already renamed the function and tried to move it, but I'm still getting the error.
Line 65 is the line with 'GetMid()'
Here's the part of the code that errors:
local function Update(Status)
if Called == false then
GetMid()
Update1()
Called = true
end
term.setCursorPos(MidX, MidY2) term.clearLine() term.setCursorPos(MidX,MidY2) – Clear the 'Status' line and set the Cursor on the line again
print("Status: " .. Status)
end
local function Update1() – Only called once
term.setCursorPos(MidX,MidY1)
if bm == false then
print "Bonemeal: Disabled"
else
print "Bonemeal: Enabled"
end
end
local function GetMid()
MaxX, MaxY = term.getSize()
MidX = MaxX / 2
MidY = MaxY / 2
MidY1 = MidY - 3
MidY2 = MidY + 3
end
(For some reason it doesn't paste the indents. Look at the pastebin code. The part begins at line 63 and goes to line 88)
And if you need the full code: Pastebin
I'm getting the error '65:attempted to call nil' even if the function in that line exists.
I already renamed the function and tried to move it, but I'm still getting the error.
Line 65 is the line with 'GetMid()'
Here's the part of the code that errors:
Spoiler
local function Update(Status)
if Called == false then
GetMid()
Update1()
Called = true
end
term.setCursorPos(MidX, MidY2) term.clearLine() term.setCursorPos(MidX,MidY2) – Clear the 'Status' line and set the Cursor on the line again
print("Status: " .. Status)
end
local function Update1() – Only called once
term.setCursorPos(MidX,MidY1)
if bm == false then
print "Bonemeal: Disabled"
else
print "Bonemeal: Enabled"
end
end
local function GetMid()
MaxX, MaxY = term.getSize()
MidX = MaxX / 2
MidY = MaxY / 2
MidY1 = MidY - 3
MidY2 = MidY + 3
end
(For some reason it doesn't paste the indents. Look at the pastebin code. The part begins at line 63 and goes to line 88)
And if you need the full code: Pastebin