This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Dejected's profile picture

Bios:339: [String "testemail"]:13: Unexpected Symbol

Started by Dejected, 24 September 2013 - 04:28 PM
Dejected #1
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
Engineer #2
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
Mr. Fang #3
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.
LBPHacker #4
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…