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

attempt to call nil

Started by TheRockettek, 02 July 2016 - 06:05 AM
TheRockettek #1
Posted 02 July 2016 - 08:05 AM
Im just trying to use the windows api to do something and this is my code


local siteWindow = window.create(term.current(),1,4,50,18)

but it just says attempt to call nil.

idk why tho XD Halp
The_Cat #2
Posted 02 July 2016 - 10:02 AM
Is that all your code?
It works ok for me.
Bomb Bloke #3
Posted 02 July 2016 - 12:31 PM
The error's telling you that "window" is something that can be indexed, but "create" isn't a function within it. That suggests you've gone and overwritten the regular window API pointer with something else.

Reboot the computer, and if the problem persists, check the startup file.
TheRockettek #4
Posted 02 July 2016 - 01:43 PM
you've gone and overwritten the regular window API pointer with something else.

but i havent ;-;

Any mods that may cause this?

wait…….
I think i know why
(i doubt it tho)

ya i found out why. I had a table called window ;-;
The_Cat #5
Posted 02 July 2016 - 07:16 PM
ya i found out why. I had a table called window ;-;

Thats why you should give all the code to begin with :P/>
TheRockettek #6
Posted 02 July 2016 - 08:12 PM
:)/> its alot of code
The_Cat #7
Posted 02 July 2016 - 08:41 PM
You could always upload it to pastebin ;)/>