- Sky
- Blueberry
- Slate
- Blackcurrant
- Watermelon
- Strawberry
- Orange
- Banana
- Apple
- Emerald
- Chocolate
- Charcoal
jakendrick3
-
Content Count
3 -
Joined
-
Last visited
Posts posted by jakendrick3
-
-
Hey, sorry, I posted this a while back and it didn't get approved for a while, managed to figure out the problem. As a CC user, not used to declaring a table at the beginning of an API then having it return it. Sorry!
EDIT - ran into a new problem. Whilst attempting to use term.read("*"), the pc that is running it crashes. Trying to make an autorun with a password.
-
So, my problem occurs when trying to use this api, converted from CC:
Original:
Basically, all I am doing is:
cselected = jenisis.drawScreen(static, menu)
And I did this at the top (yes, before the function, and also the tables were declared as well):
jenisis = require("jenisis")
It's located inside the lib folder, and it's not about not finding/loading the API, because I already sorted that out. It's returning a rather unique error for an API:
/jentest:17: attempt to index global 'jenisis' (a boolean value) stack traceback: /jentest:17: in main chunk (...tail calls...)
Full 'test' program here: http://pastebin.com/ZfNvZ6Xk
Help with Menu API
in Programming
Posted
So, I've written my own menu API in CC, called 'Jenisis' named after what I called my software company on me and a few friends servers, (did quite well actually seeing as how I'm the only one who could code) and I ported it over to OpenComputers and then continued development on this, seeing as how IMO OC is better. Which brings me to my problem. I've been trying to add a feature where the API takes a table full of functions to run whenever an event is triggered, like for receiving modem messages whilst still in the menu's loop. I can't quite get it working and just need some new ideas on how.
Here's the API:
And here's the test program:
This isn't really my preferred way of doing it, I'd prefer something along the lines of:
Anyways, sorry for the wall of text, and thanks in advance for any help!