r/ComputerCraft • • Nov 18 '22

Cannot Connect to Pastebin

I'm trying to use a program from pastebin but when I put the code down, It fails to connect to pastebin itself.

Anyone know how to fix this?

2 Upvotes

11 comments sorted by

2

u/JackMacWindowsLinux CraftOS-PC & Phoenix Developer Nov 18 '22

If you're using ATM7, you need to enable HTTP in the server/world config: https://github.com/SquidDev-CC/FAQBot-CC/blob/master/faqs/atm7_http.md

2

u/MinedAgate661 Nov 18 '22

Nope, I'm using SkyFactory 2 on the ATlauncher

2

u/fatboychummy Nov 18 '22

Ah, minecraft 1.7.10.

Pastebin did a bunch of updates which broke earlier versions of CC. You'll need to either manually patch the program or install a resourcepack (server-side).

1

u/MinedAgate661 Nov 18 '22

This is already fixed. It was an issue earlier but I fixed it and now I can't connect to pastebin altogether even with the right URL.

1

u/fatboychummy Nov 19 '22

Ensure you have an up-to-date version of java installed and are using https:// not http://. I believe they updated their ssl certs as well and old versions of java do not support it.

Though you may also have been ratelimited, try getting the status code of http.get("https://pastebin.com/PASTECODE")

local handle, err, ehandle = http.get("https://pastebin.com/PASTECODE")
if not handle then
  printError(err)
  error(ehandle.getResponseCode())
end

print(handle.getResponseCode())

1

u/MinedAgate661 Nov 19 '22

I have fixed this, it is on https and Java is updated and I dont believe that I've been ratelimited. I think the fix that I used screwed me over because I could pull code from Pastebin before the fix.

I used this video to fix it https://www.youtube.com/watch?v=MkloBnl-W8s&t=26s

1

u/fatboychummy Nov 19 '22

Please run the code I posted and state what the returned error is.

1

u/MinedAgate661 Nov 19 '22

Copy the code right into the Computer or what? If it is just into the computer, it says "No such Program"

And I should've put this into the post itself but I'm extremely new to this mod so please try to be patient with me.

1

u/fatboychummy Nov 19 '22

run: edit test

paste the code (unfortunately you must paste line-by-line)

hit ctrl, hit s. hit ctrl, hit e.

run: test

1

u/MinedAgate661 Nov 19 '22

Ok, It says

Could not connect
test:4: attempt to index ? (a nil value)

Can you get anything out of that?

1

u/Osbert28 Jun 29 '24

Where should i put this resource pack in server?