It looks like you're new here. If you want to get involved, click one of these buttons!
Hello, i don't understand where is the problem with Base64.decode function...
This is my Main tab :
callback = function() GithubLoader.import_file("HyroVitalyProtago", "AllFighters-Codea-Project", "Tools/XML.lua", function() sound(SOUND_PICKUP, 11797) print(XML) end, nil, true) end http.request("https://dl.dropboxusercontent.com/s/86ilsm4r8zf3d9s/GithubLoader.private.lua.txt?token_hash=AAEmvJEG_og219e_7ue-_nq_nrj-qnHOyWeIan4Zj4BXKA&dl=1", function(data) assert(loadstring(data))() setup() end, alert)
Thanks before !
Comments
@Briarfox ? @Bortels ? An idea ?
@HyroVitalyProtago I'm not even seeing a Base64 call?
@Briarfox - This is the script loaded in http.request :
when i run the setup, i download dkjson and base64.
Function used is GithubLoader.import_file
Sorry should have realized that, I already had the tab pulled into a project. I'll look at it after work today. I haven't played with Base64 that much. I've only used to to setup oauth in my autogist.
Ok, part of problem is github save "\n", but now, when i remove "\n" with gsub, loadstring return an error
at line 81 'then' expected near '='
Original code line 81 :
if i ~= nil and i == 1 then
Code downloaded and remake with base64 :
if i = nil and i == 1 then
The character
~
disappear for one reason that i ignore...Reason : base64 of github use + and not - in Base64.lua
When use github api, don't forget about
Base64.decode(contentGetWithApi:gsub("\n", ""):gsub("+", "-"))