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

os crashes

Started by wilcomega, 16 February 2013 - 01:06 AM
wilcomega #1
Posted 16 February 2013 - 02:06 AM
i have a problem:

this is the code that i want to reveal:


window = { }
window.create = function( name )
--hidden code
end

local function explorer( )
--code that i want to hide
local desktop = window.create( "Desktop" ) --here it errors. "attempt to index ? (a nil value)"
--more hidden code
end

if you need more code to see the problem please PM me. i dont want to give out code just yet

thx in advance, wilcomega
Lyqyd #2
Posted 16 February 2013 - 04:21 AM
Post the whole code and the errors it's giving you.
remiX #3
Posted 16 February 2013 - 06:13 AM
Does the line number within the error match up with the call (local desktop = window.create( "Desktop" )) or with something that's WITHIN the actual function defining?

Maybe try changing

window = { }
window.create = function( name )
--hidden code
end

to

window = {
    create = function( name )
        --hidden code
    end
}

Otherwise, try removing the local part of the call. I've experienced where I've called something local it errored, removed it and it worked…
LBPHacker #4
Posted 16 February 2013 - 06:16 AM
window = {
	window.create = function( name )
		--hidden code
	end
}

Now that would kill Lua in an instant.
Maybe…

window = {
	create = function( name )
		--hidden code
	end
}

But he indeed has to give us more information in order to get help.
remiX #5
Posted 16 February 2013 - 06:22 AM
– snip

Woops, was meant to remove the 'window.' xD I just copied and pasted it ,_,