TopSecret5478 Posted October 5, 2021 Share Posted October 5, 2021 print(gg.makeRequest("https://gameguardian.net/version.txt").content) returns nil Link to comment Share on other sites More sharing options...
Crystal_Mods100x Posted October 7, 2021 Share Posted October 7, 2021 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 pcall(load(API)) else gg["alert"]("Error You have not granted internet access!") os.exit() end 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 More sharing options...
MAARS Posted October 7, 2021 Share Posted October 7, 2021 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.") end return result end -- 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 More sharing options...
Question
TopSecret5478
print(gg.makeRequest("https://gameguardian.net/version.txt").content)
returns nil
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.