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

kevinkk525

Members
  • Content Count

    75
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by kevinkk525

  1. maybe because the signal ist called "modem_message", not "modem" like in your event.pull("modem")?
  2. try this, but i did not test it. local component=require("component") local r=component.redstone local gpu=component.gpu local term=require("term") ---- config section local password="1234" local delay=5 --time the door stays open local side=5 --side of the door, test this ----- local wrong=false while true do term.clear() gpu.set(1,1,"Please enter the password") if wrong then gpu.set(1,1,"Password was wrong, try again") wrong=false end term.setCursor(1,2) local input=io.read() if input==password then r.setOutput(side,15) -- check if this is the correct function
  3. Actually in real world it is not that hard to connect a microcontroller and program it. Reading of course is kind of impossible. So from my site i would appreciate making writing to it easier, but it would be acceptable if reading is not possible at all.
  4. easiest way to help you is if we can see your code. Errors are much easier to find in a code than just generally... But if i have to guess I'd say you have declared your function waitForMessage as local and you are calling it therefore before it is even declared..
  5. still not correct, you only have to call event.listen("touch",touchsig) once. local event = require("event") function touchsig(_, x, y, _, _) print("Xcord: " .. x .. "Ycord: " .. y) end event.listen("touch", touchsig) while true do os.sleep(1) end
  6. Thanks, that's what I was trying to explain. You are right, with a sequence of objects I could replace the layerT by an ordered version of objects.. I will think about it while programming the next update. Thanks for your input!
  7. I don't mind competition but maybe we can work together on a GUI for OpenOS, I already have a working one.
  8. Thanks a lot for putting time into this! 1.That's actually a good idea and the reason you can have the two squares fight each other in the tech_demo is that i left it to the user to correctly use the layer system if they change the layer of an object or set one at the creation of an object. This way someone can create a GUI with all objects in the same layer and move objects "up" or "down" as he wishes. With your suggestion this would be a problem as object 1 could be layer1 and object 10 layer 10 and you would have to move it 10 layers to be above or below another object that should be on
  9. or the easy way without a new line, that will work with my previous code: function save(table) local f=io.open("filename","a") f:write(serialization.serialize(table)..";") f:close() end that will result in adding an entry "{table};" to the file (without overwriting it)
  10. thanks for clarification, i did not read his answer carefully enough. the result is of course newtext="cbcde\nbcdef" if you use the backslash.
  11. yes that does work this way.
  12. for a new line? \n
  13. It is, just load the file into a variable (e.g. text="abcdefabcdef") and run the following command: newtext=text:gsub(char,newchar) so e.g. newtext=text:gsub("a","c") will give newtext="cbcdefcbcdef". now just save that string to your file (overwrite the file)
  14. it is, but you have to think about a way to read it. if your tables get saved like this: {table1};{table2};{table3}; you can read it by doing this: local file=io.open("filename","r") local text=file:read("*all") file:close() local tables={} while true do local a=text:find(";") if a then tables[#tables+1]=serialization.unserialize(text:sub(1,a-1)) text=text:sub(a+1) else break end end Of course your tables shouldn't contain a ";" but you can change that to any symbol.
  15. ok that makes it better. At least I'm writing an API for you but i don't know when i will be implementing it completely into OpenOS ;-)
  16. sorry i don't understand what you want. if you want to save a table to a file, this is the code: serial=require"serialization" table={} file=io.open("name","w") file:write(serial.serialize(table)) file:close() --or file=io.open("name","a") if you want to append the table instead of overwriting the file
  17. Oh i thought it was an already existing 24/7 server. But it was nice to see it on youtube (did not know about it before this post). Now I know Sangar does not like GUIs
  18. On what server was that video recorded?
  19. it's .size you can have a look at that with the interactive lua, just type for a,b in pairs(component.me_controller.getItemsInNetwork(1)) do print(a, end
  20. I understand. I always use tesseracts for the fluids. make it easier and needs less server ressources tesseracts are "faster" than pipes. good luck with your program! do you want a program that checks energy level of enderio capacitors, sends that level to the reactor-pc and let the reactor-pc decide when to start/stop the reactor? Maybe you can copy some of its features to use it with your program, if that suits your intended usage. My reactors never run all the time, i have a big energy storage and let the reactor start/stop according to energy level. BTW: NEVER build "batteries" with M
  21. Ok that's if the amount is too high for the turbines. if the steam is too low will you use an external source of water if the reactor has not enough to keep the e.g. 50 bucket/tick?
  22. Sounds very interesting! Quite useful program if it works. I don't want to persuade you, but maybe you want to have a look at my GUI-API, it could make some things easier for you. You place objects on the screen and just set the function it should call if you click on that object. You wouldn't need to manually check everything. Maybe just give it it a try and have a look at the tech_demo. If you don't like it or don't want to read into it, that's perfectly fine. How will the program regulate the Steam Flow? Pumping water in externally?
  23. You have a few problems in your code: 1. it does not call touch2, remove the "local" from function ontouch2 and see for yourself --> you print test on screen during while loop in manualrod() 2. while loop in manualrod(): if you changed 1. and ran the code you will see that you are stuck in that loop and pc does not react anymore, add os.sleep(1) in there 3. function ontouch2 can't read a,b as they are local in function manualrod, remove the local and it will work (just for debugging) 4. your if in ontouch2 is not good, put the line "elseif y == b+9 and x > a+1 and x < a+9 then" fi
  24. you can try =component.gpu (e.g.) or for a,b in pairs(comonent.gpu) do print(a, end
×
×
  • Create New...

Important Information

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