Jump to content

Recommended Posts

Posted (edited)

So, I am playing on a modpack using computercraft. I am using wireless rednet to make a remote control turtle, using an Advanced Computer and an Advanced Wireless Turtle. So far, I have a program named "Turtle" on both, that should allow you to use keys WASD to make the turtle go forwards and backwards, as well as turning left and right. I can not get it to work, can somebody help me? Here are the programs and error messages used and returned by the turtle and computer.

So, I have an error in lines 4 and 2, and I can not figure out what the errors are. Can someone figure it out for me? Thank you.

Edited by recneps
Added Pastebin instead of raw typing.
  • Discord Moderator
Posted

Thanks for removing the code from the post. However, it's much nicer if you actually provide a link we can click on instead of having to copy the raw text from a code block, create a new tab, and paste the URL into that.

  • Why do you have so many blank lines in your code. It makes it very hard to read.
  • Pretty sure you want to be using == instead of = in your conditionals. You are putting assignment operators in your conditional statements.
  • Please create pastebins of the actual code inside the Lua source files, not some amalgam of multiple programs and some extra text and error messages. I can't diagnose things when it's all mashed together.
  • You should have feedback from the turtle so that the controlling computer knows whether the commands are working properly.
  • Here's a link with a couple loop and turtle examples that might help you: http://www.circlecraft.info/cc/
Posted (edited)

Thank you, sorry I can not edit my pastebin to make it easier, I got my turtle-side code fixed, but I can not get the error on the computer-side code fixed, it still wants a name. Okay, I figured out how to use the pastebin from the ComputerCraft OS, and made a new one of the computer-side code, which can be found here.

Edited by recneps
Added the final sentence.
  • Discord Moderator
Posted
  • Which version of ComputerCraft?
  • What specific error are you getting?
  • If you are going to do anything other than the most basic of programs, you will want to be using a code-based editor like Notepad++. You can use that to edit the Lua files directly instead of in-game. They are located in the saves/world/computer/<id> (where <id> is the ID of the computer you are using in-game).
Posted

I didn't know you could directly access the Lua files! Thank you for helping with this, I got the problems solved, except for one. I had a bit of rollback on my world, and now am getting an error(bios:367: [string "Turtle"]:13: 'then' expected on this code.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...