Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal

Wobbo

Members
  • Content Count

    28
  • Joined

  • Last visited

  • Days Won

    6

Wobbo last won the day on February 23 2015

Wobbo had the most liked content!

About Wobbo

  • Rank
    Junior Member

Contact Methods

  • Website URL
    https://github.com/rmellema
  • Minecraft
    Wobbo
  • GitHub
    rmellema

Profile Information

  • Gender
    Male
  • Location
    The Netherlands

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Your problem is is that the second argument to shell.execute is the environment to run the program in. You are probably looking for os.execute, which doesn't pull shenanigans like this. You give os.execute one string, which is the program name followed by the arguments, the same as in the shell. os.execute("prgm_name arg1 arg2")
  2. Wobbo

    Using Coroutine

    You won't have to worry about driver mode I guess (someone correct me if I'm wrong). At the end of the basic usage section on the wiki there is an example of using event.listen. It refers back to the example above.
  3. Wobbo

    Using Coroutine

    Instead of coroutines, you might want to use event.listen. You can find information about event.listen on the OC wiki. MOD EDIT: Wiki link http://ocdoc.cil.li
  4. Wobbo

    Minejaro

    Since this has a shell, I guess it is more like a Desktop Environment than an OS, is this right? Or is it more like X.org? In any case, some pictures would be nice Anyway, I might try this out later. When time is available.
  5. Why has nobody mentioned os.exit here yet? That should work just fine.
  6. Pipes are use to redirect the output of a program to a file or another program. So, lets say we have a program curl that downloads files from the internet, but doesn't save them. Then we could write the contents of the downloaded file to harddisk like this: curl http://example.com > example.html the > redirects the output to the file. We also have < which reads from a file. So if we take for example grep (oppm install grep should work): grep 'local .- = .*' < file.lua we give grep the contents of file.lua as input (grep is a kind of silly example, since it can already read fi
  7. I would really reread that tutorial if I were you. Now your library cannot be unloaded, since it is placed into the global environment. That is why you need to use a table and return that at the end, like this: local term = require("term") local test = {} function test.fred(text) term.write(text) end function test.george() term.write("should not see this unless george was called!") end return test
  8. I would suggest you read a tutorial, like [shameless plug]mine[/shameless plug]. That should teach you everything you need to know about loading and writing libraries.
  9. You are using the timer correctly, that is not the problem. But when you go down, you never reset your height to 0. So the next time you call Harvest, you first go down the blocks you need to go down, but then you also go down for the previous trees. You can solve this by setting height to 0 just after the loop where you go down. Also, it is better if you place a local before your function definitions. Then you won't clutter the environment as much and you free up some RAM after your program finished running.
  10. Could you try your first version with the event, but extracting the address before you define the function? So like: local address = ... event.listen('init', function() ... fs.mount(address, "main") end This should get rid of the varargs error.
  11. Wobbo

    Port list

    I'm not saying the networks are the same, but only that it would make sense to reserve the port that is normally reserved for ssh would also be reserved for a ssh clone in OC, also since OpenOS is based on real life OSes and follows certain real life protocols and standards. So it is in the spirit of the rest of the mod. And it doesn't make stuff complicated or unoriginal, it makes it so you can easily transport real life experience into the mod.
  12. Wobbo

    Port list

    Actually, your program should take a command line argument to set the port, like this: prgm --port=41324 and use that port. This resolves all conflicts for custom settings and interaction with other programs. And I do agree with SKS about the real world port thingy. If I want to make a ssh for OpenComputers, it would be natural for most people to use port 22, not some arbitrary other port because someones multiplayer game already uses that port. The same goes for ftp, telnet and a whole other rage of programs that fit into the same category. This makes it easier for people that use those
  13. So, you want to know what this `require` thingy does? Or maybe you installed a library you can't load? You want to write your own library? Then we are here to help you. In this tutorial, we are going to explain how the `require` function and the `package` library works. So, lets get started! Loading Libraries In order to load a library, you can use the function `require`. But what does `require` do? Where does it pull these libraries from? `require` needs the name of the library you want to load, but not the path to that file, so it needs to search the file system somehow. This is done by lo
  14. No computers from 2015 onwards? What kind of horrible future is this?!D: That means my education will only leave me a defunct psychologist! I don't have the skill sot build cognition without a machine to build it on :/
  15. Do you mean attempt to index 'slots'? The value Inventory does not exist in your code. If this is the case, then the problem is that your library doesn't return the function you define. The module system in OpenComputers differs from that in ComputerCraft, where this would be valid. In OpenComputers, the module is expected to either return something, or to place something in package.loaded[modulename]. This is then returned to the requiring file. If neither of this happens, require simply returns true, to indicate that the file was found and loaded, which results in the variable slots in
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.