- Sky
- Blueberry
- Slate
- Blackcurrant
- Watermelon
- Strawberry
- Orange
- Banana
- Apple
- Emerald
- Chocolate
- Charcoal
darthhose
-
Content Count
4 -
Joined
-
Last visited
Posts posted by darthhose
-
-
Hi.
I' m trying to write a controll program for stargates from gregs sgcraft.
I made one with all known adresses and a need to send this program to all Computers i use (dont want to update every computer manual if i add a new adress)
Is it possible to send hole programs?
Or can i use an hdd with multiple Computers (and if thats possible, how could i access that hdd)I made a program out of search results from google, many (MANY) lua wikis and a youtube tutorial. am i on the right way or is it just stupid?
shell = require("shell") file = require("filesystem") term = require("term") local dir = shell.getWorkingDirectory() local args, options = shell.parse(...) -- this part reads the lines of a file and saves it in a table if #args >= 1 then doc = dir .. args[1] print(doc) reader = io.open(doc, 'r') if reader ~= nil then z = 1 x = {} for line in reader:lines() do x[z] = line z = z + 1 end reader:close() end end -- this part takes the table and puts the stings back into a file y = io.open(dir .. args[2], "w") if y ~= nil then for i in pairs(x) do y:write(x[i], "\n") end y:close() print("done") else print("error") end
right now it just takes the lines from one program to another on the same computer. i will use a modem to send it to another.
or is there another way to do this?
Thanks
-
Goto
in Programming
Hi,
i looked everywhere (at least i think i did), but i couldn't find it. So:
How do i use "goto" in opencomputers? Please give an example for it, because that would make things easier for me. (i learned lua on my own and i'm still learning)
thanks
-
Hi.
I started to use this mod today, so i'm really new.
My main problem is, that after some time, the computer is out of memory. Is it possible to get more free memory without rebooting?
Another problem is, that i always need a boot floppy. i dont get how to boot from an hdd.
thanks for your help,
chris
Transfer programs between computers
in Miscellaneous
Posted
figured it out on my own... i wrote 2 programs (1 for reading and sending and the 2nd for recieving and saving).