←  Peripherals and Turtle Upgrades

ComputerCraft | Programmable Computers for Minecraft

»

[MC 1.7.10] [CC 1.65] Immibis's Peripherals

kyle1elyk's Photo kyle1elyk 23 Dec 2015

I'm having trouble getting a script to run, and I don't see an easy way around my problem. I have encrypted data on a mag-card and encryption works fine as well as decrypting, as long as the ciphered text is valid, but if it isn't then the script ends, even when using pcall, the only clue being it prints the word "missing"

--[[Code Above not shown]]
ee = {os.pullEvent()}
	if ee[1] == "mag_swipe" then
	 key = enc.decodeKey("AES", "RAW:GuR/36KtbYk6/uX6r+SDLw==")
	 if pcall(key.decrypt("AES/CBC/PKCS5Padding", ee[2])) and key.decrypt("AES/CBC/PKCS5Padding", ee[2]) =="randomPassword" then
	  redstone.setBundledOutput("bottom",1)
	  code = 13
--[[Code Below not shown]]

any help?


Edit: Thanks Lyqyd for pointing out the dumb mistake. If anyone wants the full code here's the pastebin: HHxutz1L
Edited by kyle1elyk, 23 December 2015 - 02:57 AM.
Quote

Lyqyd's Photo Lyqyd 23 Dec 2015

You're using pcall wrong. The first argument should be the function you want to pcall, with subsequent arguments being the arguments to pass to that function. Instead, you're calling the function with its arguments and then passing whatever that function returns to pcall, which is almost certainly not going to be a function value.
Quote

kyle1elyk's Photo kyle1elyk 23 Dec 2015

View PostLyqyd, on 23 December 2015 - 01:33 AM, said:

You're using pcall wrong. The first argument should be the function you want to pcall, with subsequent arguments being the arguments to pass to that function. Instead, you're calling the function with its arguments and then passing whatever that function returns to pcall, which is almost certainly not going to be a function value.
Alright, thanks. I should of looked into that more instead of posting here.
Quote

Chaz's Photo Chaz 22 Jan 2016

I only just started giving this addon a proper look, and I absolutely adore the idea of RFID and Mag-Swipe cards - A much more elegant, roleplay-friendly way of making security terminals, compared to the Floppy Disk ID Card system I'd been working on! Almost makes me want to try and make a ComputerCraft-aided adventure/challenge map. Unfortunately I'm having trouble finding much in the way of pre-made modpacks that include this mod, but I'm definitely gonna be playing about with this some more.

Are there any plans to bring Immibis' Peripherals up to 1.8.9/CC 1.78?
Quote

immibis's Photo immibis 27 Mar 2016

View PostChaz, on 22 January 2016 - 06:36 AM, said:

Are there any plans to bring Immibis' Peripherals up to 1.8.9/CC 1.78?

Why would anyone voluntarily use Minecraft 1.8?

Perhaps the situation is different for servers with a handful of small mods, like ComputerCraft-only servers.
Quote

ElvishJerricco's Photo ElvishJerricco 27 Mar 2016

View Postimmibis, on 27 March 2016 - 11:46 PM, said:

View PostChaz, on 22 January 2016 - 06:36 AM, said:

Are there any plans to bring Immibis' Peripherals up to 1.8.9/CC 1.78?

Why would anyone voluntarily use Minecraft 1.8?

Perhaps the situation is different for servers with a handful of small mods, like ComputerCraft-only servers.

Minecraft 1.8 has come a looooong way since it came out. With developments in Forge, the API has actually come up to par with 1.7. It's quickly becoming the prominent modding version until 1.9 gets all sorted out.
Quote

Communeguy's Photo Communeguy 31 Mar 2016

Just curious - does anyone know if this works with CC 1.74? I know it was written for 1.65, but I wonder how much that could really be broken by. Obviously this isn't SUPPORTED, but still...
Edited by Communeguy, 31 March 2016 - 10:13 PM.
Quote

Lupus590's Photo Lupus590 31 Mar 2016

View PostCommuneguy, on 31 March 2016 - 09:50 PM, said:

Just curious - does anyone know if this works with CC 1.74? I know it was written for 1.65, but I wonder how much that could really be broken by. Obviously this isn't SUPPORTED, but still...

Back up your saves and try it, what's the worst that could happen?
Quote

Communeguy's Photo Communeguy 31 Mar 2016

Fair point... Turns out it does, at least for me, if anyone was curious.
Quote

immibis's Photo immibis 25 Apr 2016

View PostElvishJerricco, on 27 March 2016 - 11:51 PM, said:

View Postimmibis, on 27 March 2016 - 11:46 PM, said:

View PostChaz, on 22 January 2016 - 06:36 AM, said:

Are there any plans to bring Immibis' Peripherals up to 1.8.9/CC 1.78?

Why would anyone voluntarily use Minecraft 1.8?

Perhaps the situation is different for servers with a handful of small mods, like ComputerCraft-only servers.

Minecraft 1.8 has come a looooong way since it came out. With developments in Forge, the API has actually come up to par with 1.7. It's quickly becoming the prominent modding version until 1.9 gets all sorted out.
Well, if you're not sticking to 1.7.10, you should be following the latest version, which is currently 1.9. Since ComputerCraft isn't updated to 1.9 yet I can't update this to 1.9.
Edited by immibis, 25 April 2016 - 03:26 AM.
Quote

Lupus590's Photo Lupus590 25 Apr 2016

View Postimmibis, on 25 April 2016 - 03:26 AM, said:

View PostElvishJerricco, on 27 March 2016 - 11:51 PM, said:

View Postimmibis, on 27 March 2016 - 11:46 PM, said:

View PostChaz, on 22 January 2016 - 06:36 AM, said:

Are there any plans to bring Immibis' Peripherals up to 1.8.9/CC 1.78?

Why would anyone voluntarily use Minecraft 1.8?

Perhaps the situation is different for servers with a handful of small mods, like ComputerCraft-only servers.

Minecraft 1.8 has come a looooong way since it came out. With developments in Forge, the API has actually come up to par with 1.7. It's quickly becoming the prominent modding version until 1.9 gets all sorted out.
Well, if you're not sticking to 1.7.10, you should be following the latest version, which is currently 1.9. Since ComputerCraft isn't updated to 1.9 yet I can't update this to 1.9.

I'm not a mod maker, but from what I've heard, updating to 1.9 from 1.8.9 is a very simple process, but 1.7.10 to 1.8.* is not. With this in mind, you may want to get a head start by updating to 1.8.9

I personally don't update until the mods I want to use have been updated, I've only recently switched to 1.8.9 from 1.7.10 and am still waiting for sum mods.
Quote

bluemax9's Photo bluemax9 12 Jul 2016

Hello,
I am new to the peripherals mod and also computercraft and was wondering if anyone could help.
I have this code for an rfid card.
Spoiler
I seem to be getting the error "RFID3:5: Already scanning" . I get this error with every code I have used so far from the forums.
Thanks for any help! :)
Quote

_strx's Photo _strx 30 Apr 2017

Hello! Is it possible for this to be ported to 1.10.2? Would be much appreciated by all.
Quote