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

mystcraft computer portal help.

Started by Dukeprogaming, 25 March 2015 - 08:00 PM
Dukeprogaming #1
Posted 25 March 2015 - 09:00 PM
using mystcraft 11.1 and computercraft 1.65

ive been using the touchpoint computercraft program for a wile now

pastebins:
Tp: http://www.computercraft.info/forums2/index.php?/topic/14784-touchpoint-api/
portal: http://pastebin.com/aEbEeLfW

and sence ive updated to 11.1 of mystcraft im getting an error on line 82 of the portal code. i can only assume that mystcraft changes how there book info is written. how can i fix this?
HPWebcamAble #2
Posted 25 March 2015 - 10:52 PM
What is the exact error?

My guess is you are correct, that Myscraft changed how book data is stored

This is line 82 (On the pastebin):

names[#names + 1] = {name = stackInfo[a]["myst_book"]["destination"],slot = a}

Above in the program, stackInfo[a] is checked to make sure it isn't nil, so we can rule out stackInfo being nil

Try, in the lua prompt, printing what the stack info table looks like

lua> chest = peripheral.wrap("iron_4") --# I think the chest is called iron_4
lua> print(chest.getAllStacks())

Using the new format for the table, you can change how line 82 indexes the table
If you need help with that, you can always ask :)/>
I'd to it myself, but I don't have time right now
Dukeprogaming #3
Posted 29 March 2015 - 10:05 PM
Ive tried wjat you posted but i have no knowledge of how to read/access the table. All that came up was table:49yce6ug
HPWebcamAble #4
Posted 29 March 2015 - 10:24 PM
All that came up was table:49yce6ug

Oops, wasn't sure if 'print' automatically serialized

Try doing the same thing, but with 'textutils.serialize()':

lua> chest = peripheral.wrap("iron_4") --# I think the chest is called iron_4
lua> print(textutils.serialize(chest.getAllStacks()))
Dukeprogaming #5
Posted 30 March 2015 - 01:14 AM
here what i got from the commands from here i am lost ive tried the different names and ids they got listed here. im not seeing a destination section anymore so does this mak the portal codes harder to make now?
Bomb Bloke #6
Posted 30 March 2015 - 01:50 AM
I've got a vague idea that you might be able to work around this by renaming the book with an Anvil?
Dukeprogaming #7
Posted 30 March 2015 - 02:02 AM
ok re nameming in a book and changeing line 82 to
  • names[#names + 1] = {name = stackInfo[a]["display_name"],slot = a}

works