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

Molinko

Members
  • Content Count

    451
  • Joined

  • Last visited

  • Days Won

    35

Everything posted by Molinko

  1. The code looks great.. One problem stands out and that is that your keyChecker coroutine isn't being run. Also, Your main function and the keyCheck function both have a loop that will block one another if keyChecker is run within main. Try this solution out. I believe its what you're going for.... function main() local running = true local e = nil repeat -- Get the tank information, results are in table format local tInfo = batbox local cap = tonumber(batbox.getCapacity()) local fill = tonumber(batbox.getStored()) -- Output as you want... a very simple way:
  2. You're very welcome . If you find the opencomputers config settings and change 'bufferChanges=true' to 'bufferChanges=false', you won't have to close minecraft every time you want to access a computers filesystem outside of MC.
  3. /../Curse/Minecraft/Instances/Custom pack/saves/Alleron Next/opencomputers/d81d5515-0d52-466a-ac35-a5d8e3ba3b7e (<- example filesystem address) **32-bit UUID is the address of the in game filesystem(computer drive) you want to save on.
  4. You are correct. I thought for some reason that was an example you inserted to say ...this model... The 'answer' var is a string returned from either term.read() or io.read() (excuse my first advice. term.read is probably better...). The line you're looking for is this.. os.execute("print3d /usr/share/models/" .. answer .. ".3dm") -- # string concatenation -- # OR os.execute(table.concat({"print3d ", "/usr/share/models/", answer, ".3dm"})) -- # Using table.concat({...})
  5. Open your modded minecraft folder. Open the relevant ../saves/.. folder. Open the open computers folder and find the filesystem of the in game computer to place the file on. The filesystem's are listed by the filesytems component uuid.
  6. Replace require 'term' with 'io'. You don't use term lib but you are using the io lib. If that's not your issue please post the full code and resulting error please.
  7. http://ocdoc.cil.li/tutorial:custom_oses Check out the "What's available" section in the link for the default environment available at the eeprom level. Remember drone don't have a file system and thus booting open os into them isn't possible( hard to do..). You won't have access to libs like the event lib. You will have access to raw component libs though.
  8. I haven't worked much with AE and OC but I think you'll need an import or export interface on the me bus connected to the adapter with inventory controller. FYI, I'm not sure...
  9. What you're looking for is a function. Specifically a 'for' or while loop in a function. Here is a crude one of the former that 'could' be made way better (features n stuff)... local robot = require 'robot' local function forward( times ) times = times or 1 local success, reason, moves = false, nil, 0 for move = 1, times do success, reason = robot.forward() if not success then break end moves = moves + 1 end return success, moves, reason end -- # USAGE -- # Let's say we're moving 3 forward, on a clear path. forward( 3 ) -- # // true, 3, nil (success, moves, reasonForFailur
  10. Yes, functions are real... I'm not really sure what you meant by that.. But here's an example anyways.. -- # A named function local function sum( a, b ) return a + b end -- # An 'anonymous' function stored in the named variable 'mul' local mul = function( a, b ) return a * b end local pow -- # forward declaration allows us to reference the caller 'pow' inside of itself. pow = function( a, p ) if not p then -- # return a partial application return function( p2 ) -- # remember the initial number 'a' and take a power of p2 to apply return pow( a, p2 ) end end return a^p end
  11. Interesting OS. Small, simple, and to the point. I like it. BTW, what exactly is the point? It seems heavily network oriented as the title suggests... Base Control.. Sounds neat. I'm looking forward to a breakdown of what you intend this to be :)....
  12. I believe I see the problem.. You are sleeping past the responses from the server.. Try this out. It has some comments to try and explain... -- # Setting libraries local component = require("component") local term = require("term") local event = require("event") local modem = component.modem -- # Program code modem.open(111) term.clear() print(">") term.setCursor(2,1) input = io.read() if input == "server.status" then modem.send("address of the server", 123, input) -- # os.sleep(2) // HERE. We sleep beyond the response of the server, thus waiting forever. -- # event.pull is es
  13. Please post the formatted server code. Preferably in code tags formatted for lua. I'll take a crack at it.
  14. I believe the later version of oc has good support for enderio bundled cable. Also, I believe the delay between setting two colors at once is solved with bundled cable here. Just a thought
  15. Not sure if this will solve the delay between calls, but you can try using rs bundled cable and set the output simultaneously.. rsComponent.setBundledOutput(sides.back, colors.green, colors.red) I don't think you can specify ticks for delay.. Only seconds and a tenth I believe...
  16. Replace getOutput with getInput. getOutput checks if the computer itself is outputting a rs signal.
  17. It would be easier for myself and others to help if you were a bit more descriptive. Is there an error message? If so which file? Things like that.
  18. You could think about loading libraries remotely into memory from a network... As TYKUHN2 said.. With an extra step of requesting a file... require could be switched with a call to load or loadfile. -- # pseudo code.. this might work but isn't tested or even run... function require(module) -- # do some checks n shit.. local file, chunk = nil, "" modem.send(address, port, "get[file] " .. module) while true do local e, la, ra, p, d, ch, status = computer.pullSignal(2) if e == "modem_message" then if status:match("error") then -- # request failed somehow
  19. Look up the function 'load' and or 'loadstring'. I'd post more but I'm on my phone at work
  20. The backslash is above the the enter/return key(qwerty) below the backspace button..
  21. From what I understand file:seek is only a method available when reading files with io.open. The char you need it backslash n or '\n'. You can use the concatenation operator to join 2 strings into one. Looks like this '..' . I.e. s = 'line 1\n' .. 'line 2\n' .. 'More lines...' file:write(s)
  22. Could you post the script that is running on one of the computers when this crash happens please. 'Too long without yielding' is an error thrown by OpenOS when a program doesn't yield to let other programs or the shell run.
  23. Tis a really old post.. If you're seeking help on a particular piece of code try making a new topic in Programming/Support
×
×
  • Create New...

Important Information

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