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

[OrangeOS] Weird function bug

Started by Ziriee, 23 August 2014 - 12:31 PM
Ziriee #1
Posted 23 August 2014 - 02:31 PM
So, I am having a weird bug, where I got window:57: expected number, then I removed a 'local' from 1 variable in the bar api and then I started to have even a weirder bug.
Spoiler
You can get the whole OS here:

pastebin run cYQF9usm
Bomb Bloke #2
Posted 23 August 2014 - 03:52 PM
Is this an OS you're building yourself, or one you've found from somewhere? If it was initially written by someone else, it may not be compatible with your version of ComputerCraft.

I can tell you that the "window" API is mostly called by the "term" API. If "window" is erroring, it's likely because you called a term function incorrectly.

I can also tell you that the "rough description" in that screenshot is wrong - an attempt to index nil doesn't mean that "part of a table doesn't exist" so much as it means "the object you're trying to treat as a table in the first place doesn't exist".
Ziriee #3
Posted 23 August 2014 - 04:18 PM
Is this an OS you're building yourself, or one you've found from somewhere? If it was initially written by someone else, it may not be compatible with your version of ComputerCraft.

I can tell you that the "window" API is mostly called by the "term" API. If "window" is erroring, it's likely because you called a term function incorrectly.

I can also tell you that the "rough description" in that screenshot is wrong - an attempt to index nil doesn't mean that "part of a table doesn't exist" so much as it means "the object you're trying to treat as a table in the first place doesn't exist".

I am building the OS by myself, also even after using

os.loadAPI("data/api/bar")
This happens:
Spoiler

I found the problem, it was in the bar api itself