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

Search the Community

Showing results for tags 'internet card'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • OpenComputers
    • Announcements
    • Feedback
    • IRC
  • Code Central
    • Support
    • Showcase
    • Tutorials
  • Addons & More
    • Addons Mods
    • Architectures
    • OpenEngineering Task Force
  • General
    • Lounge
    • Forum Games
    • Showcase
    • Servers
  • Archives
    • Public Archives

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start





Website URL








Fediverse ID



Found 6 results

  1. I am working on a script to control robots using the internet card, and as part of this I need to be able to know where a waypoint is. I am using navigation.findWaypoints(), but the tabe that it returns behaves differently depending on weather or not I use the LuaOS interpreter, or just run the same function over the network. I have already tried two ways of serialization, and both work as expected in the lua interpreter. They also function as expected when call them directly with hand-typed tables over the network. The problem comes when they are passed the result of pcall(component.invoke("ADDRESS_GOES_HERE", "findWaypoints", 16)). In that case, I get only the first layer of tables as follows: R2-D2 recived command 'component.invoke("c4272274-e2ab-472b-b450-153710c88709", "findWaypoints", 16)'. 1: table: 0x7fbce02af5f0 n: 1 What is changed such that the functions no longer have the same behavior? version 1 (self-made): function ptable(tbl, recursed) if not recursed then for k, v in pairs(tbl) do if type(v)~='table' then link.write(string.format("%s:%s, ", k, v)) else link.write(string.format("%s:{", k)) ptable(v, true) link.write("}, ") end end else for k, v in pairs(tbl) do if type(v)~='table' then link.write(string.format("%s:%s, ", k, v)) else link.write(string.format("%s:{", k)) ptable(v, true) link.write("}, ") end end end end versions 2&3 (found on the lua wiki): function table_print (tt, indent, done) done = done or {} indent = indent or 0 if type(tt) == "table" then for key, value in pairs (tt) do io.write(string.rep (" ", indent)) -- indent it if type (value) == "table" and not done [value] then done [value] = true io.write(string.format("[%s] => table\n", tostring (key))); io.write(string.rep (" ", indent+4)) -- indent it io.write("(\n"); table_print (value, indent + 7, done) io.write(string.rep (" ", indent+4)) -- indent it io.write(")\n"); else io.write(string.format("[%s] => %s\n", tostring (key), tostring(value))) end end else io.write(tt .. "\n") end end function vardump(value, depth, key) local linePrefix = "" local spaces = "" if key ~= nil then linePrefix = "["..key.."] = " end if depth == nil then depth = 0 else depth = depth + 1 for i=1, depth do spaces = spaces .. " " end end if type(value) == 'table' then mTable = getmetatable(value) if mTable == nil then print(spaces ..linePrefix.."(table) ") else print(spaces .."(metatable) ") value = mTable end for tableKey, tableValue in pairs(value) do vardump(tableValue, depth, tableKey) end elseif type(value) == 'function' or type(value) == 'thread' or type(value) == 'userdata' or value == nil then print(spaces..tostring(value)) else print(spaces..linePrefix.."("..type(value)..") "..tostring(value)) end end Thank you all in advance for helping me learn what I should fix.
  2. vTunnel can be used to add bridging over the internet to any existing OpenOS software that uses linked cards. Despite originally being written for Minitel, vTunnel implements a fully-functional linked card emulator and a server that will run under most unix-likes (OpenBSD is currently somewhat flaky, Linux is recommended). You can peruse the page on Github, for documentation and protocol information. Install it with oppm: oppm install vtunnel Additionally, you can read the documentation in-game with man vtunnel
  3. Mystery

    Drone usage?

    Hello. I have recently decided to create an exploration drone which will scan the world using geolyzer and transfer data to the server via linked card (400 blocks range is not enough far for me). However, I have faced a major problem - linked card requires tier 3 slot. I was surprised even more when I have figured out that internet card, which is more powerful for my opinion, requires tier 2 slot. And now I am really confused: Is there at least any job in which drones are better than robots? Sorry for my English.
  4. This is the project I was working on 2 months ago or so. I couldn't find a real shell client for OC, so I had to create one by myself. That's how NGSH was born. Contributions and pull requests are welcome There are two versions: The first one uses the Python pyte library for terminal emulation, but it is very slow (it redraws everything) and has no colour support. The second one (I called it PTY) takes advantage of OpenOS's VT100 library, which is fast and has colour, but very broken and inaccurate due to missing checks and/or escape sequences. I may get back to serverside emulation at some point, because OC isn't fast enough for VT100 emulation. For instructions see my GitLab repository (make sure to download the PTY version) Before you run the client, make sure to install my improved terminal libraries for proper emulation of \r, \b, and inverse video, like so: pastebin run rs0QiTHp Screenshots:
  5. Hello everybody, I'm trying to connect my OC's computer to my tcp server with the first example here http://ocdoc.cil.li/api:internet local internet = require("internet") local handle = internet.open("example.com", 1337) local data = handle:read(10)------------------------- I REMOVED THIS LINE handle:write("1234") handle:close() , but my server don't receive the message. I tested with a "real" socket client, and my server is working well. Is the code shown in link is outdated or i'm missing something ? OC version: MC version: 1.7.10 Thanks in advance for help
  6. Good day! Help if possible with implementation. Everyone knows that the shell is a shell, but here in the OC, it is not made because the UNIX system. I like about the execution of several commands in a single request. Show all clearly what is not there: /# echo 'I am the root' && cd bin/ && echo 'This file is created in the directory /bin' >> test.lua or /# echo 'I am the root' || cd bin/ || echo 'This file is created in the directory /bin' >> test.lua Why not add these in the OC must be important operators. For example right now I need to make a web harness, which first sends a request to the site, and the results are displayed in shell.execute(). It is a pity that only supports input execute a single command. It is possible to implement something like that or not?
  • Create New...

Important Information

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