- Sky
- Blueberry
- Slate
- Blackcurrant
- Watermelon
- Strawberry
- Orange
- Banana
- Apple
- Emerald
- Chocolate
- Charcoal
Rayder44
-
Content Count
6 -
Joined
-
Last visited
Posts posted by Rayder44
-
-
Hello all,
I've noticed that in some libraries they are opening the Unicode API. There's also a page on the website covering the methods for it. However I can't find any file in openOS that contains this API. Without going into too much detail, my program requires the libraries it loads to be in a file. Since I cannot find this specific file, I'm concerned many of the libraries won't work properly unless I provide this one as well.
Is there a source code file somewhere on Github?
-
Hi there,
I've been trying to research how to use the Geolyzer, but it seems I can't find anything to answer my question. I'm familiar with how to do a simple scan with the Geolyzer, but its the other arguments that have me stumped. According to the wiki, the arguments are written as so:
scan(x:number, z:number[, y:number, w:number, d:number, h:number][, ignoreReplaceable:boolean|options:table]):table
Now, the only way I've been able to get the method to work is using the x and y numbers, and a boolean. I can add a number on the end to pull a specific number of the returned table, but that's about it. None of the other arguments seem to work no matter what I try. Anybody have experience using this?
I'm running version 1.7.10 with OpenComputers v1.7.2.
-
The error I'm getting is this:
/test.lua:11: ')' expected near 'a'
The only thing I can think of is for whatever reason, the method can't retrieve a variable like that. Is there anything else I can do?
The mod I'm using is Mekanism, for reference.
EDIT: Oh I done goofed! I was referencing the same variable in the next line in a print function. Seems I stuffed up the formatting there!
Thanks for your help!
-
Hi all,
I hope this hasn't been covered before. I also hope it's not something insanely simple... Hopefully I get my terminology right.
So I'm running apiece of code which sets the injection rate for a fusion reactor, the line reads:component.reactor_logic_adapter.setInjectionRate()
The method expects a number to be used in the brackets, which is fine. But I want to run some other code and use a number stored in a variable. I'm running some code to work out what injection rate I need. Ideally I'd like to run something like this:
local a = 2 component.reactor_logic_adapter.setInjectionRate(a)
But of course that doesn't work haha. Is there a way I can insert a variable like that?
-
Hello all,
I'm new to OpenComputers and Lua in general, and I'm having fun messing around with the code and seeing what I can do with it. But I've hit a snag.
I've installed OpenComponents and I'm attempting to use OC with IC2 and at the moment, specifically the Nuclear Reactor. I've used the command (=component.Reactor) and it shows me the different methods(?) I can use with it. The problem is it shows me 10 that I can use, then an ellipsis (...). I'm assuming that this means there are more methods that can be used, but they're not shown? If so, how do I view them?
I'm planning on using AE2 and MFR, and hopefully automating a fuelling cycle for the Nuclear Reactor. And please, go easy on me I've only started learning how to code a few days ago and have almost no idea about coding and Lua.
Thank you.
Arguments for Geolyzer
in Programming
Posted
So it seems the Geolyzer can take some "options" when running .scan or .analyze. According to the wiki and in-game, the format is like so:
scan (x:number, z:number [, y:number, w:number, d:number, h:number][, ignoreReplaceable:boolean | options:table]) :table analyze (side:number [, options:table]) :table
For argument 7 the format is easy to understand, it's either boolean or table. Boolean works as expected but the table is throwing me off (options:table). What goes in here? What data types, and how many? Digging through the source code reveals this:
val options = if (args.isBoolean(optIndex)) mapAsJavaMap(Map("includeReplaceable" -> !args.checkBoolean(optIndex))) else args.optTable(optIndex, Map.empty[AnyRef, AnyRef])
Unfortunately I'm not familiar with Java, so it's a little tricky for me to understand. What this means to me is, if arg7 is a boolean, it will use that. Otherwise it will use a table. Putting variables other than boolean or table throws an error (understandably). .analyze has a similar line of code, as it also takes "options". However instead of optIndex, it just has the number 1.
val options = args.optTable(1, Map.empty[AnyRef, AnyRef])
That's about as far as I've gotten. Putting in values doesn't seem to do anything, the values themselves don't seem to do anything, and it seems anything I put in the table affects nothing.
Any ideas?