Posted 07 January 2013 - 12:27 AM
i am getting an error which i cant figure out why.. i have looked through my code several times, but i cannot find the error.
Error:
parallel:22: parallel:4: bad argument: function expected, got bolean
code
http://pastebin.com/gHtscyLc
thanks in advance.
EDIT
i just updated this, instead of making a whole new post:
When doing this code, ( adding variables to a table ) then the table seems to be nil, still..
function sObj1(...) -- XCor, YCor, TxtIcon, BacColor, TxtColor --
if obj then
local tArgs = {...} -- x, y, Icon Msg, bacColor, txtColor
if #tArgs ~= nil then
tP(tArgs[1], tArgs[2])
tB(tArgs[4])
tT(tArgs[5])
tW(" ")
tP(tArgs[1], tArgs[2]+1)
tW(tArgs[3])
tP(tArgs[1], tArgs[2]+2)
tW(" ")
end
table.insert(ChorMsg, tArgs[3])
table.insert(ChorsX, tArgs[1])
table.insert(ChorsY, tArgs[2])
table.insert(ChoreX, tArgs[1]+8)
table.insert(ChoreY, tArgs[2]+2)
end
end
sObj1(5,5, " Console ", black, white) -- black and white is defined in top of my whole program --
and im getting the error, when using the mouse_ click:
function mouse()
local event, mB1, xM1, yM1 = os.pullEvent("mouse_click")
if event == "mouse_click" then
if mB1 == 2 then
if xM1 >= ChorsX[1] and xM1 <= ChoreX[1] and yM1 >= ChorsY and yM1 <= ChoreY then -- on this.... when calling the ChorsX[1] (which is global to the program) it looks like the table has been removed, or is nil.. ehm - ----- why--
else
sRM(xM1, yM1, black, white, 4, " Stop ", " Settings ", " Reboot ", " Shutdown ")
if event2 == "mouse_click" then
if mB2 == 1 then
if xM2 >= xM1 and xM2 <= xM1 + 8 and yM2 == yM1 + 1 then
tP(xM1-5, yM1-2)
tB(black)
tT(white)
clear()
run, tRun, obj, sBor, loop, sIcon = false
elseif xM2 >= xM1 and xM2 <= xM1 + 8 and yM2 == yM1 + 2 then
tRun, obj, sBor, sIcon1 = false
shell.run("edit "..sett2)
sleep(0.8)
tB(lightGray)
tT(white)
clear()
run = true
tRun = true
obj = true
sBor = true
loop = true
sIcon1 = true
else
tB(lightGray)
tT(white)
clear()
end
else
tB(lightGray)
tT(white)
clear()
end
end
end
elseif mB1 == 1 then
end
end
end
Thanks in Advance