mailbody = fs.open(to, "w")
mail = fs.open(to, "w")
mail.writeLine("FromId: " .. id)
mail.writeLine("FromName: " .. name)
mail.writeLine("To: " .. to)
mail.write(message..table.concat(mailbody,',\n'))
mail.close()
- ComputerCraft | Programmable Computers for Minecraft
- → whatsfast's Content
whatsfast's Content
There have been 33 items by whatsfast (Search limited from 10-February 22)
#55317 [Question]Writing onto a file
Posted by
whatsfast
on 29 November 2012 - 04:56 PM
in
Ask a Pro
Whenever I write onto a file it deletes what is before.
#54781 [Question]How to close a running program.
Posted by
whatsfast
on 27 November 2012 - 04:09 PM
in
Ask a Pro
Also can you give the code for the detecting of everything around the world like chest opened and stuff. Also I though that maybe you could have a basic server that reads the url. given from a client. And then sends back text of like a webpage or something. And the text could be saved in a file on the computer or I could have another computer as the website. Il think about this tomorrow.
#54772 [Question]How to close a running program.
Posted by
whatsfast
on 27 November 2012 - 03:57 PM
in
Ask a Pro
Right now im on tekkit build. So maybe it will work. If tekkit would update to the advanced computers, I probably doubt I will use them because I like the feel and usage of the normal computers. It kinda sound stupid but there a lot simpler is what I like. I just rehearsed coroutines and I kinda now understand them.The only problem is how would you detect a chest opening and for example the amount of items took out? That seems kinda complex in my opinion. Like how would you do it and what detects it? A computer or a turtle?
#54768 [Question]How to close a running program.
Posted by
whatsfast
on 27 November 2012 - 03:48 PM
in
Ask a Pro
I like the idea of a status updater for everything. Nice idea. If I know how coroutines work. NO. Never heard. I have no idea even how to detect a if an item is taken out let alone a if a chest is open. You have some crazy ideas. I guess I could try to make one and then post it on the forums. But I will need some help. Also how does a internet sound? Also what would I put on the internet.....like a moving nyan cat
#54749 [Question]How to close a running program.
Posted by
whatsfast
on 27 November 2012 - 02:00 PM
in
Ask a Pro
WOW. I am definitely going to do that. The system works perfectly. My next job is to add more scripts. I got a login, programs, and planned email and notification servers. What else do you think I should add?
Lights and controlling stuff like that will be in a another system/building.
Lights and controlling stuff like that will be in a another system/building.
#54725 [Question]How to close a running program.
Posted by
whatsfast
on 27 November 2012 - 12:55 PM
in
Ask a Pro
I am trying to run a program that gets a code from another computer and then runs that code. Whenever I run the code it gives me the bios:26:Attempt to write to global. My guess is that the programs are intefering with each other. So my question is how would I have the program I don't need any more to stop?
#54653 Running a program sent from another computer?
Posted by
whatsfast
on 27 November 2012 - 10:03 AM
in
Ask a Pro
Lyqyd, on 26 November 2012 - 05:13 PM, said:
No, you still have the same problem I told you about several posts ago. You have to declare your variables before you use them. How the hell is it supposed to know what the value of loginclient is before you've told it what the value is? Of course it sends nil.
#54396 Running a program sent from another computer?
Posted by
whatsfast
on 26 November 2012 - 02:29 PM
in
Ask a Pro
Ok I did that and no errors but the program isnt starting.
<p> </p>
<div>local function ldstrng(message)</div>
<div> local tmpfnc,rslt = loadstring(message)</div>
<div> if tmpfnc then _,rslt = pcall(message) end</div>
<div> return rslt end</div>
<p> </p>
<div>local function ldstrng(message)</div>
<div> local tmpfnc,rslt = loadstring(message)</div>
<div> if tmpfnc then _,rslt = pcall(message) end</div>
<div> return rslt end</div>
#54345 Running a program sent from another computer?
Posted by
whatsfast
on 26 November 2012 - 12:55 PM
in
Ask a Pro
Im trying to make it so that the program is being accessed from another computer not through a file. What you just did here will help me in the future for when I make a email system so it won't go to waste. But still my question isn't answered. How would I make it so that a string with the program is sent to another computer "the client" and then run on that one without any saving on the client side and they can't see anything. I want this because I have a server and I cant have people accessing my files and getting into my system. I got everything. The only problem I have is making a string run like a program and the code note being accessible. for that program.
- ComputerCraft | Programmable Computers for Minecraft
- → whatsfast's Content


