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

natedogith1

Members
  • Content Count

    36
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by natedogith1

  1. The non-https forum isn't set up properly. It leads to a "Welcome to nginx!" page. (go to http://oc.cil.li/ instead of https://oc.cil.li/ to see the issue).
  2. If you sneak right click with an empty hand, the robot should start. And robots can sneak right click.
  3. Did you remember to pass your main function, rather than the results of executing the main function, to pcall. Your error handling code should probably look something like this (if you're using pcall): local ok, err = pcall(main) -- notice no () if not ok then stopTimer() print(err) end
  4. As a general rule of thumb, the name of a texture is modid + ":" + blockName And after a bit of searching, I believe the fluids you're looking for have the following texture names: tconstruct:molten_enderium mo:matter_plasma tconstruct:molten_stone thermalfoundation:fluid/Fluid_ender_Still thermalfoundation:fluid/Fluid_ender_Flow
  5. What code are you using to unserialize the file? (if you had said it was the first line you might have gotten around it by making the file contain one table instead of two (wrap the entire thing in {})) Actually, from the lua manual (section 3.4.8 or 3.4.9 - Table Constructors) "The field list can have an optional trailing separator, as a convenience for machine-generated code."
  6. Just tried with fire fox on windows 10, doesn't happen there. But this issue does still exist on windows 10 google chrome.
  7. The nanomachines have a "saveConfiguration" method, that when executed will save the configuration to an unconfigured nanomachine item in your inventory.
  8. The only way I'm aware of that you can get NBT is using the getTileNBT method of the debug card. However this is a creative-only item. Though it seems you might be able to use the crop as a component if you have open peripherals installed.
  9. You're going to want to do write the bytes to the stream using string.char As an example, you can look at a program I made a while ago (it's slow from what I recall, but I was just testing stuff). http://pastebin.com/NLvQmUYh
  10. What style of server is it? Mostly I'm just curious if it's creative or survival or something else. (couldn't seem to find the info on your site, though that could be because I'm not registered)
  11. The delay is a config value, by default it's one second. I'd recommend waiting for a response from the nanomachines, that way you never send the next message early.
  12. computer.pullSignal uses the bubbling yield (rather than the user-exposed yield)
  13. OpenComputer wraps calls to coroutine.yield and coroutine.resume so that they can bubble sysyields. It's part of how OC handles component methods. (if you want to look at the code that does the yielding stuff you can check here )
  14. Aside from what Gangsir fixed, os.pullEventRaw doesn't exist in OC. Also, computer.pullSignal skips over all user created coroutines (so you'd need to override computer.pullSignal or event.pullFiltered to call coroutine.yield).
  15. This seems like a similar issue to http://oc.cil.li/index.php?/topic/413-computers-on-same-network-conflict-with-eachother/?hl=raid
  16. You might be able to convert this implementation to lua. Also, why are you checking if "/" is readonly rather than checking /tmp ?
  17. I think os.date might be calculating things incorrectly, as it's designed for the minecraft world, not the real world. You could use another implementation top get a better value. (Also, while not an ideal option, if you have an internet you could use a web api (I've done that with computer craft))
  18. Other than a loop you'd also need to: keep track of the state, make sure one step equals one trigger, sleep local component = require("component") local sd = require("sides") local rs = component.redstone local oldSignal = false local state = false while true do local signal = rs.getInput(sd.front) > 0 --check if we have a redstone signal if signal ~= oldSignal then --make sure we don't trigger twice when the plate was stepped on once ' oldSignal = signal state = not state --make it so we toggle if state then print("Opening door") rs.setOutput(sd.right, 15)
  19. Line endings may be the same to Lua, but they might not be to the compression code. For instance, if I were to replace all instances of "local " with "\0\13" and put that in a long string and read it in, my algorithm would break. (\13 is \r)
  20. actually, \n and \r characters at the begining and end will be striped out, and \r will be converted to \n
  21. as far as I'm aware there are three ways to do that sort of compression, each with its own upside/downsides return load((source):gsub("\0","function"))() --good if you're only have one key word return load((source):gsub("\0(.)",{a="function",b="local",c="table",d="string"}))() --good general solution for multiple key words, relatively easy to read the shortened version of return load((source):gsub("\0(.)",function(a)return({"function","local","table","string"})[a:byte()]end))() --grows slower than the table version as you add words, but requires more space in the beginning --probably r
  22. You could probably do something with overriding pullSignal
  23. If I'm reading the source code right, it looks like it'd return an empty string if the connection was closed, and null if no bytes were read.
  24. I was making a thing with tcp via the internet card, but I ran into a thing. How do you check if the server closed the connection? I think I can pcall the internet component's finishConnect method to check if the connection has been closed, but that feels hacky and unreliable.
×
×
  • Create New...

Important Information

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