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

Turtle shop.

Started by Chocolatelover26, 20 February 2014 - 10:36 PM
Chocolatelover26 #1
Posted 20 February 2014 - 11:36 PM
I have thought of a simple concept for a turtle shop.
I have a turtle which pulls out items from a chest below, next it identifies which item it is using the turtles inventory, if unidentified it will put the item into an inventory above, otherwise it will use the itemType and stackSize to go to a position where it can then pull out an item of a 'barrel' (from Factorization mod - I am using the Direwolf20 pack on FTB launcher). It will then return to its original position, if it succeeded in getting a new item from the shop, it will put the original item into a trash can (from extra utilities) and put the new item into the chest above. If the turtle fails, then it will put the original item into the above chest.

I am getting an error that states that I should have an '=' at line 229, where all I have is an 'end' to end an if statement. Any help that anyone can give me is much appreciated :)/>

The most recent code I created can be found at : [html]<a href="http://pastebin.com/mcv8d0pe">PasteBin</a>[/html]

Pictures of my shop layout can be found at :
[html]<a href="http://tinypic.com?ref=hv1ati" target="_blank"><img src="http://i59.tinypic.com/hv1ati.png" border="0" alt="Image and video hosting by TinyPic"></a>[/html]
[html]<a href="http://tinypic.com?ref=sepqxd" target="_blank"><img src="http://i60.tinypic.com/sepqxd.png" border="0" alt="Image and video hosting by TinyPic"></a>[/html]
Bomb Bloke #2
Posted 21 February 2014 - 12:14 AM
It expected to see something else before it saw that "end" statement; it's guessing you wanted to put an "=" in there (though that guess is wrong, in this case). Take another look, see if you can spot what should go in between "turtle.turnRight" and "end".

And yes, this is covered in this post. ;)/>
Chocolatelover26 #3
Posted 21 February 2014 - 01:48 AM
Thank you for your advice, but I just realised what was wrong when looking at it, I put "turtle.turnRight" when I should have put "turtle.turnRight()" I can't believe I made such a rookie mistake.