Jump to content


D35Per4d0's Content

There have been 1 items by D35Per4d0 (Search limited from 30-March 23)


By content type

See this member's

Sort by                Order  

#175751 Turtle mining swarm

Posted by D35Per4d0 on 28 April 2014 - 11:52 PM in Turtle Programs

I too have tried a few of the version, but am having no luck. When I run the initial setup file, it creates the first file from the table, but it doesn't populate it.
I get the following error when I run the script through an emulator:

ERROR: [string "input"]:7056: attempt to index global 'textutils' (a nil value)

I've tried troubleshooting the code myself to figure it out. I've got very little programming experience, none with LUA, but I am usually pretty good at figuring out how these work. I've tried adding some print commands to see where the program actually breaks. I have come up with a few possibilities.

#1:
I tried changing the textutils.unserialize line to textutils.serialize, which does extract the files and writes them, but all the \ lines in the contents causes further problems. This makes me think that the contents need to be serialized before they can be unserialized, but I didn't see anywhere that was taking place?

#2:
I've also read that this particular error can result when the file that attempting to be written is in the ROM folder, but I added a print line to display the directory that it is writing to, and it is showing up properly as swarm, even though there is no swarm directory actually being created.

Perhaps I am completely wrong and don't know what I am talking about, but this is all new to me and I'm just trying to piece it together. Any suggestions from the masters?