I wrote a program for a turtle to craft different tools based on a touchscreen input from a monitor. I ran it after editing a few lines of code, and nothing happened. I then tried to edit it, but I received an error: "Error: 132: attempt to call string". I don't know why it's doing this. I checked my saves file and the program is still in there. What's going on?
4 replies to this topic
#1
Posted 25 November 2015 - 11:18 PM
#2
Posted 26 November 2015 - 12:00 AM
More likely than not, you defined a string with the same title as one of ComputerCraft's in-built functions. You likely also made it a global variable, meaning that it's remaining loaded in memory even when your script completes - it'll stay there until you reboot the computer, interfering with any other scripts that relied on the original function pointer.
If you can't figure it out, post your code.
If you can't figure it out, post your code.
#3
Posted 26 November 2015 - 12:29 AM
I rebooted the computer and now I can edit the code. I also noticed that I named a variable 'type'. Could this be the problem?
#4
Posted 26 November 2015 - 12:35 AM
Certainly could be.
#5
Posted 26 November 2015 - 01:20 AM
I renamed the variable and defined it as local. It fixed the problem. Thanks a billion!
2 user(s) are reading this topic
0 members, 2 guests, 0 anonymous users











