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

Fictitious Rotor

  • Content Count

  • Joined

  • Last visited

  • Days Won


Fictitious Rotor last won the day on March 24 2018

Fictitious Rotor had the most liked content!

About Fictitious Rotor

  • Rank
    Junior Member

Contact Methods

  • Minecraft
  • GitHub
  1. It's referring to the ':' symbol provided by lua, which lets you use 'self' in a given function. The topic is explored here and here There is also an explanation of how to use the library provided at the start of the library itself. This line shows you how to encode a table
  2. This sounds like a nifty idea. Maybe the trigger should be when you put a tablet in an item frame?
  3. You'll want to import the "computer" library using local computer = require("computer") As for the beep - see if you can find it in this doc page: https://ocdoc.cil.li/api:computer
  4. local rs = component.proxy(component.list(“redstone”)()) Local wr = component.proxy(component.list(“modem”)()) --[[ ^ capital letter not allowed! Use 'local' ]] wr.open(2110) local x,w,a,d,f,sent = computer.pullSignal() rs.setOutput(3,100) #output to front --[[ ^ this is a shell comment - lua will try (and fail) to parse this! Learn about Lua comments here: https://www.lua.org/pil/1.3.html ]] while true do if sent = “enon” then --[[ ^ here you've missed the distinction between '=' and '=='. While '=' is an assignment operator (such as "local a = 4") then '==' is an
  5. Never cottoned on that it was actually in the package.lua api file - I assumed you had to use the API somehow - but many thanks
  6. Is there a file I can change somewhere, either on a computer in the mod or in my minecraft files so that I can modify the LUA_PATH variable? I'd like to add another directory to it!
  7. What you're looking for are daemons/services. These are programs that run in the background while your gui is available in the foreground for you to use as normal. Trouble is, they're kinda complex it took me far too long to understand how to use them! Simpler solutions could be turning all of your functions into separate lua scripts and having a central program execute them one by one, round robin style. As long as the scripts don't take too long, this would probably serve your purpose. Of course if you want proper multithreading (i.e. running everythin
  8. So a few quick things. First, when you get a problem, please send us a screenshot and logs if possible to make it easier for us to identify your problem. Second, when you're looking at an API in the documentation, be sure to look at the examples that they give as they contain lots of hints! For example, the first snippit.lua in the computer api shows why your program doesn't work. I'll demonstrate a working solution here. Before you can call any methods, you have to assign the computer API to a variable. What they usually do in the documentation is to call th
  9. Seeing as documentation is rather hard to come by for RC, I had a lengthy and highly enjoyable Easter egg hunt trying to figure out how it works - getting so far as to successfully replace autorun with it Thank you for all the help!
  10. Ah yes the '/' at the end of '/mnt/' is very important as it tells the computer that the location is a folder rather than a file. Try doing 'cd /' and then 'cd /mnt/T3' and see if that works.
  11. In fact there IS an error - it's just you can't see it Try doing local fs = require("filesystem") print(fs.mount("T3", "/T3")) And you'll see a different story! So the reason this happens is that your main drive is already mounted at "/". When you try to mount it at "/T3" then it complains... An easy way to get around this it to mount it at "/mnt/T3" like so: local fs = require("filesystem") fs.mount("T3", "/mnt/T3") Btw - you'll find that it's already in /mnt/ as well under a different name. Try doing 'ls /mnt/' In the shell to see wha
  12. Oh dear. I found the link you were talking about and I see what you mean So I believe that the '...' stands for the drive GUID or its label i.e. "277317a0-68b6-40ec-b264-d22fd76d23ff" <--- GUID Or "277" <--- Default label So seeing as my default label is "277", I can put the following in autorun.lua: local fs = require("filesystem") fs.mount("277", "/mnt/mainDrive") Now I highly doubt your hard drive will have a label of "277". If you want to get the label of your hard drive you can type 'df' Into the shell, as instructed in that link you mentioned ea
  13. Apologies for the (very) late response - got caught up in irl things somewhat! Although it saddens me that autorun isn't behaving the way it's meant to, it's certainly going to stop me tearing my hair out trying to figure out what I did wrong I'll try to figure out how to write the service as you describe and see how I can progress from there - thank you very much for your help!
  14. Hi there, I've been messing around with some basic robots and autorun.lua. My aim was to be able to plug a floppy disk into a robot, start the robot up and have the robot copy the program that would be stored on the floppy disk. Once the file was on the internal drive, the robot would run it. The idea was that I'd be able to set the robot's functionality by hotswapping floppy disks. Trouble is, the robot autorun hasn't really been behaving. When I run the program in the shell, it works every time. However, when the robot starts up it works... sometimes.
  15. Though all of the other answers were very informative and helpful, yours struck a chord with me in terms of clarity. Thank all you very much for spending so much time helping me out!
  • Create New...

Important Information

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