Posted 03 July 2013 - 02:51 PM
I am making a program that looks for certain text in the chat and does different actions depending on what is said. The first idea I had was for a turtle to give you food if you say that your hungry. There is a monitor that will run a program with three different buttons asking which kind of food you want to eat and clicking any of them makes a turtle drop that kind of food, but I keep getting an error for the button API im using and I don't know how to fix it.
My code: http://pastebin.com/GxLS986E (This program is on the computer next to the chatbox). http://pastebin.com/G71N9JpB (This is on the computer with the monitor on top of it and a wireless modem on the right of it). http://pastebin.com/8LP3v0i0 (This on the same computer with the monitor on top of it). http://pastebin.com/uBXhL6NU (This is on the turtle). http://pastebin.com/AZXTp8be (This is the button API).
The error I am getting after clicking the "Steak" button: button:74: attempt to call nil
Note: I am extremely new to Lua and ComputerCraft is general and if anything seems extraneous it is most likey so I can add on to it in the future.
Thanks in advance :)/>
My code: http://pastebin.com/GxLS986E (This program is on the computer next to the chatbox). http://pastebin.com/G71N9JpB (This is on the computer with the monitor on top of it and a wireless modem on the right of it). http://pastebin.com/8LP3v0i0 (This on the same computer with the monitor on top of it). http://pastebin.com/uBXhL6NU (This is on the turtle). http://pastebin.com/AZXTp8be (This is the button API).
The error I am getting after clicking the "Steak" button: button:74: attempt to call nil
Note: I am extremely new to Lua and ComputerCraft is general and if anything seems extraneous it is most likey so I can add on to it in the future.
Thanks in advance :)/>
Edited on 05 July 2013 - 05:52 PM