Jump to content
  • 0

gg.makeRequest not working



2 answers to this question

Recommended Posts

Printing doesn't execute stuff you are just printing the function if you want to make a script with pastebin just make an account on there and make your paste make sure its lua code.

once you are done putting code in the paste . save the paste and go to the raw link. above the search bar copy that link then

do the following here:

--GameGuardian makes a internet request
local API = gg.makeRequest("paste bin raw link").content

--Checks if you granted access. if true then it will procceed to load the code inside of the pastebin
if API then
  gg["alert"]("Error You have not granted internet access!")

Just a little note you don't have to write your functions in  bracket notation you can always use regular gg.alert() they both work 

Link to comment
Share on other sites

I have recently created this function

local function Prequest(url, data)
  local result = gg.makeRequest(url, nil, data).content
  if not result then
    gg.alert("HTTP request failed, please make sure you are connected to internet and allow connection to the script.")
  return result

-- Call the function without data
local test = Prequest("https://pastbin.com/hAUUYayh")

-- Call function with data
local test = Prequest("https://pastbin.com/HSHsbbsh", "Hello World !")

Headers are rarely used so i just ignored that, if you want you can add the param. for the header

Prequest stand for : Protected Request

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.