Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

updating code

edited December 2012 in General Posts: 154

This code is a demo for update's for game/app's

Pacman has loading problems sorry

I need sum help

You can modify it if you like.

(Sorey I have not been on that match lately :( )

!!PACMAN NOT MINE!!!


function setup() local url = "https://raw.github.com/gist/2815108/47ef4a5fe5e1c6f585c7ecfaabae3532b6a55831/pacman" http.get(url,httpCB) end function httpCB(data,status,header) if status ~= 200 then print("failed to download code") return nil end local luacode = loadstring(data) luacode() setup() end

Comments

  • Posts: 666

    Add a print statement to get the code out of the string?

  • edited December 2012 Posts: 154

    Haw do you do that? :/

  • dave1707dave1707 Mod
    Posts: 8,574

    Add the line of code shown below. Run the program and the code will show in the print window. Hold you finger on the code and a popup to select all will show. Select all and then copy. Create a new project and paste the code there. If you have more questions, don't hesitate to ask.


    function setup()     local url = "https://raw.github.com/gist/2815108/47ef4a5fe5e1c6f585c7ecfaabae3532b6a55831/pacman"     http.get(url,httpCB) end function httpCB(data,status,header)     if status ~= 200 then         print("failed to download code")         return nil     end          print(data) -- add this line     local luacode = loadstring(data)     luacode()     setup() end
  • edited December 2012 Posts: 154

    Good I can add that to my a app codea forums app (when the code finds code it will make a button to run the code) good plarn?

Sign In or Register to comment.