Fix various issues with subscript errors (#9041)

This commit is contained in:
Wires77
2025-10-26 04:27:37 -05:00
committed by GitHub
parent bd4d10596e
commit db05a2c773
2 changed files with 5 additions and 5 deletions

View File

@@ -224,11 +224,11 @@ You can get this from your web browser's cookies while logged into the Path of E
self.controls.exportFrom:SelByValue(self.exportWebsiteSelected or main.lastExportWebsite or "Pastebin", "id")
self.controls.generateCodeByLink = new("ButtonControl", { "LEFT", self.controls.exportFrom, "RIGHT"}, {8, 0, 100, 20}, "Share", function()
local exportWebsite = exportWebsitesList[self.controls.exportFrom.selIndex]
local response = buildSites.UploadBuild(self.controls.generateCodeOut.buf, exportWebsite)
if response then
local subScriptId = buildSites.UploadBuild(self.controls.generateCodeOut.buf, exportWebsite)
if subScriptId then
self.controls.generateCodeOut:SetText("")
self.controls.generateCodeByLink.label = "Creating link..."
launch:RegisterSubScript(response, function(pasteLink, errMsg)
launch:RegisterSubScript(subScriptId, function(pasteLink, errMsg)
self.controls.generateCodeByLink.label = "Share"
if errMsg then
main:OpenMessagePopup(exportWebsite.id, "Error creating link:\n"..errMsg)

View File

@@ -299,13 +299,13 @@ function launch:DownloadPage(url, callback, params)
errMsg = "No data returned"
end
ConPrintf("Download complete. Status: %s", errMsg or "OK")
return responseHeader, responseBody, errMsg
return responseBody, errMsg, responseHeader
]]
local id = LaunchSubScript(script, "", "ConPrintf", url, params.header, params.body, self.connectionProtocol, self.proxyURL)
if id then
self.subScripts[id] = {
type = "DOWNLOAD",
callback = function(responseHeader, responseBody, errMsg)
callback = function(responseBody, errMsg, responseHeader)
callback({header=responseHeader, body=responseBody}, errMsg)
end
}