- Sky
- Blueberry
- Slate
- Blackcurrant
- Watermelon
- Strawberry
- Orange
- Banana
- Apple
- Emerald
- Chocolate
- Charcoal
mpmxyz
Members-
Content Count
56 -
Joined
-
Last visited
-
Days Won
24
mpmxyz last won the day on April 14 2020
mpmxyz had the most liked content!
About mpmxyz
-
Rank
Junior Member
Profile Information
-
Gender
Not Telling
Contact Methods
-
GitHub
mpmxyz
Recent Profile Visitors
2132 profile views
-
Content Introduction Reproducing an Error Error Messages Debug Output Appendix List of Error Messages Using a Debugger Ad alert: cbrowse Introduction Writing code is one thing, making it work is a completely different story. More often than not something is not working as intended and sometimes your program just crashes the instant you run it. This can be fun and inspiring but most often it is just frustrating. This guide is meant to introduce you to several useful debugging techniques with the primary focus being Open
-
Having issues with some code on opencomputers with opensecurity
mpmxyz replied to Sherlok's question in Programming
I can't help you directly because I don't have OpenSecurity installed and you've already got too much code for me to walk through manually. But here are a few hints: Add debug output! (A lot!) You want to find out the values of important variables throughout your code. Compare the output to what you would expect! You can narrow down the area of the error because it must be somewhere after a correct output and before a wrong output. Move your outputs closer to the error. When you found the error fix it. You can now remove all remaining debug output. In -
Update 13.04.17: -fixed a bug which was caused by filesystem.list returning file names without sorting in newer OC versions -added crunch to oppm I decided not to add a 'self extracting archive' option because that deserves to be another program. The output of that program could be compressed though. My next target will be full Lua 5.3 support. I have to check memory requirements after that though. (lots of new operators) Update 16.04.17: -Added Lua 5.3 Support (Operators were missing.) Memory requirement didn't increase noticeably. But the parsing table grew by
-
computronics Help with Computronics rack components
mpmxyz replied to nnystyxx's question in Programming
It's actually a good idea to keep using this part as it allows for easier extension using options: local args, options = shell.parse(...) --"prog arg1 -ab --option --value=2 arg2 arg3" will result in: args = {"arg1", "arg2", "arg3"} options = { a = true, b = true, option = true, value = "2", } But this needs further processing because the received arguments are strings and the functions expect number values corresponding to a light number and a color: local shell = require("shell") local colors = require("colors") local args, options = shell.parse(...) (...) --You can acce -
If you have installed an internet card in your computer you can access the "real world" internet. One example on what you could do: wget 'https://raw.githubusercontent.com/mpmxyz/ocprograms/master/home/bin/tar.lua' This will download the file tar.lua. It is a small program I wrote to interact with real world *.tar archives. Note: On some OpenComputers versions you had to install internet related programs separately using an "internet disk".
-
Disclaimer: I haven't thought through everything; it's just a quick idea. You'd have to hack into the component system and add a "virtual" gpu bound to a "virtual" screen. Both virtual components should be set to be the primary one. It involves a lot of writing code to support the basic functions of gpu and screen. Events have to be modified, too.
-
Isn't there something like a speed upgrade for MAs in AE2? http://ae-mod.info/Acceleration-Card/ If you want to forward a crafting request to OC you can use an AE2 interface to a buffer robot. You could have one pair for compressing tasks and another pair for uncompressing tasks. I could imagine having two columns of robots. The rear column is distributing the items and the front column is doing the crafting. The two robot columns would be controlled by broadcast wireless signals. The two (or more) input buffers would limit themselves to something like 1000 crafting actions and would give w
-
Sometimes it is helpful to write a small tool. To give you an example - it requires you to remove the blocks adding components and rebuilding them in the right order: pastebin get LCXQ9JH1 factory_companion.lua factory_companion test.cfg [enter number of different components] [enter a field name for every component type, can be nested (i.e. "inventory", "furnace.right" or even an empty string to add a list to the root table)] [add the stated component to the network; the program listens to "component_added" signals] [press enter to save config file] cat test.cfg It's just a quick and di
-
Can you show the part of your code that does all that? That might help replicating the error.
-
Did you use the given command? It works fine for me. What is your error message? (Does your OC computer have an internet card?)
-
Finally a place to brag with my current project. It still needs some fine tuning but it is almost done. If you read the output carefully you get some hints about the features:
-
You haven't seen the part about slavery, did you? For me it looks like a parody of real license agreements. PS: Nice UI, but I wished that it was fully translated... I just formatted the disk because I don't understand Russian at all. xD Do you already use a localization library? A well made one should make your live easier.
-
Your program is nice. Processing the component documentation to make it more readable is a nice idea. I read through your code and noticed one thing: string.find(methodDoc, "[--]") When writing this you probably thought that this matches the two minus signs within a documentation string. But the square brackets indicate a set of possibilities for one character only. "%-%-" matches two minus signs. Since you adjusted the indices in the following string.sub calls there is no noticeable effect on your program. (So if you "correct" that string.find, you have to change the indices again.)
-
Introduction Are you creating the secret underground base? A pyramid maze with all kinds of traps? Or just your high security door lock? Then it's very likely that you are using redstone. More complex designs require bigger circuits or computers. (redstone computers?) Programming with redstone cards or blocks is quite straightforward, but it can be quite annoying to always repeat yourself: local component = require("component") local sides = require("sides") local colors = require("colors") local rs = component.redstone rs.setBundledOutput(sides.north, colors.blue, true) --close entr