So the problem is the first things he do it perfect, he get the items in his inventory, send the rs output signal to farm the area and let the water go away after 2 minutes. But if he want to plant the items he get an error.
The error is this:
/home/Farming.lua:197: attempt to call a nil value (field 'select'):
stack traceback:
/home/Farming.lua:197: in global 'start_farming'
/home/Farming.lua:233: in global 'get_info_from_main'
/home/Farming.lua:237: in main chunk
(...tail calls...)
[C]: in function 'xpcall'
machine:798: in global 'xpcall'
/lib/process.lua:63: in function </lib/process.lua:59>/home/Farming.lua:189: attempt to index a nil value (global 'robot'):
stack traceback:
/home/Farming.lua:189: in global 'start_farming'
/home/Farming.lua:225: in global 'get_info_from_main'
/home/Farming.lua:229: in main chunk
(...tail calls...)
[C]: in function 'xpcall'
machine:798: in global 'xpcall'
/lib/process.lua:63: in function </lib/process.lua:59>/home/Farming.lua:43: attempt to call a nil value (field 'turnleft'):
stack traceback:
/home/Farming.lua:43: in global 'start_farming_route'
/home/Farming.lua:210: in global 'start_farming'
/home/Farming.lua:225: in global 'get_info_from_main'
/home/Farming.lua:229: in main chunk
(...tail calls...)
[C]: in function 'xpcall'
machine:798: in global 'xpcall'
/lib/process.lua:63: in function </lib/process.lua:59>/home/Farming.lua:43: attempt to call a nil value (field 'turnleft'):
stack traceback:
/home/Farming.lua:43: in global 'start_farming_route'
/home/Farming.lua:210: in global 'start_farming'
/home/Farming.lua:225: in global 'get_info_from_main'
/home/Farming.lua:229: in main chunk
(...tail calls...)
[C]: in function 'xpcall'
machine:798: in global 'xpcall'
/lib/process.lua:63: in function </lib/process.lua:59>/home/Farming.lua:43: attempt to call a nil value (field 'turnleft'):
stack traceback:
/home/Farming.lua:43: in global 'start_farming_route'
/home/Farming.lua:210: in global 'start_farming'
/home/Farming.lua:225: in global 'get_info_from_main'
/home/Farming.lua:229: in main chunk
(...tail calls...)
[C]: in function 'xpcall'
machine:798: in global 'xpcall'
/lib/process.lua:63: in function </lib/process.lua:59>
You can post now and register later.
If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.
Greetings dear OC Community.
I have a problem with my script for a robot to farming an area.
The robot get the 'start farming' info from a other computer over modem_message.
Here is the code from the computer that sends the start farming info to the robot.
And here ist the farming code from the robot.
So the problem is the first things he do it perfect, he get the items in his inventory, send the rs output signal to farm the area and let the water go away after 2 minutes. But if he want to plant the items he get an error.
The error is this:
Please can someone help me?
Link to post
Share on other sites