36 posts
Location
Philadelphia, Pennsylvania
Posted 24 September 2013 - 06:28 PM
Here's the code:
rednet.open("top")
while true do
i = 1
print("1")
id,message = rednet.receive()
if message == "send" then
print("2")
rednet.send(id,"to?")
print("3")
id,message = rednet.receive()
sendingTo = message
while fs.exists("M"..i,,"For"..sendingTo) do
i = i+1
end
if not fs.exists("M"..i.."For"..sendingTo) then
print("4")
rednet.send(id,"say?")
print("5")
id,message = rednet.receive()
local x = fs.open("M"..i.."For"..sendingTo,"w")
x.write(message)
x.close()
end
else
end
end
Scratch That
Was much easier to see here then in computercraft
1522 posts
Location
The Netherlands
Posted 24 September 2013 - 07:14 PM
Just a tip for you. Use an out of game editor, it adds better syntax highlighting ( if you have proper editor ) and it is much easier to correct yourself :)/>/>
I would recommend notepad++ or Sublime Text
79 posts
Posted 24 September 2013 - 07:24 PM
XD great post! If anything I'd just like to agree with Engineer and say that Notepad++ is awesome for editing especially because it can be changed to read LUA in a very code-specific way.
758 posts
Location
Budapest, Hungary
Posted 25 September 2013 - 12:42 AM
LUA
Lua. With capital L and incapital (is that a word?) U and A. Lua means Moon in Purtugese, it's not an acronym.
Sorry, that's my weakpoint :D/> Seeing Lua written as LUA…