Jump to content




attempt to call nil


6 replies to this topic

#1 TheRockettek

  • Members
  • 547 posts
  • LocationRem is best girl

Posted 02 July 2016 - 07: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

#2 The_Cat

  • Members
  • 119 posts

Posted 02 July 2016 - 09:02 AM

Is that all your code?
It works ok for me.

#3 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,099 posts
  • LocationTasmania (AU)

Posted 02 July 2016 - 11:31 AM

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.

#4 TheRockettek

  • Members
  • 547 posts
  • LocationRem is best girl

Posted 02 July 2016 - 12:43 PM

View PostBomb Bloke, on 02 July 2016 - 11:31 AM, said:

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 ;-;

#5 The_Cat

  • Members
  • 119 posts

Posted 02 July 2016 - 06:16 PM

View PostTheRockettek, on 02 July 2016 - 12:43 PM, said:

ya i found out why. I had a table called window ;-;

Thats why you should give all the code to begin with :P

#6 TheRockettek

  • Members
  • 547 posts
  • LocationRem is best girl

Posted 02 July 2016 - 07:12 PM

:) its alot of code

#7 The_Cat

  • Members
  • 119 posts

Posted 02 July 2016 - 07:41 PM

You could always upload it to pastebin ;)





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users