Hey guys..
Okay so I get this error:
[CODE]Aborting HTTP request because pResponse->BSetBodyData<> failed. URL: error.garysmod.com[/CODE]
And this is what I'm trying to do: [url]http://facepunch.com/showthread.php?t=1216453&p=37938275&viewfull=1#post37938275[/url]
So I need help to convert this from the beta to the current Gmod:
[CODE]local function manageAdminCreation (body, length, headers, code)
local breakUpRes = string.Explode("\n", body)
local rt = ASS_GetRankingTable()
for _, each in pairs(breakUpRes) do
local steamSplit = string.Explode("\t", each)
if (#steamSplit == 2 && userGroupToAccess[tonumber(steamSplit[2])]) then
local steamID = steamSplit[1]
local userRank = userGroupToAccess[tonumber(steamSplit[2])]
rt[steamID] = {}
rt[steamID].Rank = userRank
rt[steamID].Name = ""
rt[steamID].PluginValues = ""
rt[steamID].UnbanTime = nil
else
local userRank = ASS_LVL_GUEST
end;
end
for _, each in pairs(player.GetAll()) do
if (rt[each:SteamID()].Rank != each:GetNetworkedInt("ASS_isAdmin", ASS_LVL_GUEST)) then
each:SetNetworkedInt("ASS_isAdmin", rt[each:SteamID()].Rank)
end
end
end
http.Fetch("http://MYWEBSITE/admin.php", manageAdminCreation, function(fail) print("Failed to load website, error code: " .. tostring(fail)); end)[/CODE]
Any ideas?
[I]EDIT:[/I] Okay. I have been trying some different things, with The function. But nothing seams to be Working?
[code]
Aborting HTTP request because pResponse->BSetBodyData<> failed. URL: error.garrysmod.com
[/code]
That occurs when a lua script errors, and tries to send the error to Garry. ( [url]http://errors.garrysmod.com[/url] )
It has nothing to do with your code really, other than telling that you have errors somewhere.
[QUOTE=ollie;38970128][code]
Aborting HTTP request because pResponse->BSetBodyData<> failed. URL: error.garrysmod.com
[/code]
That occurs when a lua script errors, and tries to send the error to Garry. ( [url]http://errors.garrysmod.com[/url] )
It has nothing to do with your code really, other than telling that you have errors somewhere.[/QUOTE]
Oh. Okay thanks :).
Sorry, you need to Log In to post a reply to this thread.