2 posts
Posted 09 May 2012 - 04:27 AM
CC: 1.30 MC: 1.1 through Technic SSP 6.0.7
I have tried this multiple times in multiple ways, but for the sake of simplicity, I am displaying the error I receive from the lua emulator. I have been searching for quite some time and only found a related issue where the values kept returning true on multiplayer. Any help is greatly appreciated, I just hope i haven't missed something simple… =/
As the topic title states, turtle.compare() returns nil no matter what I do. This is also true for the other functions in the compare family; turtle.compareUp() and turtle.compareDown()
Showing the stone in front of the turtle.
Showing the stone in the proper inventory slot in the turtle.
Showing the nil value error.
8543 posts
Posted 09 May 2012 - 04:46 AM
Make sure the turtle API is not missing. That's the error you'd get if you attempted to call functions from a missing API.
2 posts
Posted 09 May 2012 - 04:56 AM
At first, i was confused as to how the API could be missing, as it is the default turtle api that has the function, but after giving it some thought, i searched for the changelog for computercraft following a suspicion that proved to be right.
The API is certainly there, its the default turtle one, but it does not have the turtle.compare() functions in it, these were added in version 1.31. I'm thinking I might be able to pull the turtle api files from v1.31 and overwrite the ones in my 1.30 install for the time being to get this thing working, thank you for the help, i was totally lost xD.
8543 posts
Posted 09 May 2012 - 05:06 AM
I would assume that those functions are exposed in the mod itself, so copying over the newer API file (which probably isn't changed at all for various reasons) won't add in the missing functions. You will almost certainly need to update if you want to use that function.
1111 posts
Location
Portland OR
Posted 09 May 2012 - 05:44 AM
Yeah this is one of the downsides to using a technic/tekkit servers. Usually out of date, and sometimes modified so that it will work which means sometimes certain features from the original mod will not work. I recommend running either an SMP or Bukkit server so you can control your own mod versions and keep things up to date.
2447 posts
Posted 09 May 2012 - 11:22 AM
At first, i was confused as to how the API could be missing, as it is the default turtle api that has the function, but after giving it some thought, i searched for the changelog for computercraft following a suspicion that proved to be right.
The API is certainly there, its the default turtle one, but it does not have the turtle.compare() functions in it, these were added in version 1.31. I'm thinking I might be able to pull the turtle api files from v1.31 and overwrite the ones in my 1.30 install for the time being to get this thing working, thank you for the help, i was totally lost xD.
The compare function was added Java side - the only way to get it on your server, will be to update your version of ComputerCraft. The backport won't help you there either, as there is a bug where turtle.compare() always returns false.