opening file

  • ForumTroll
    6th Feb 2012 Banned 0 Permalink
    This post is hidden because the user is banned
  • mniip
    6th Feb 2012 Developer 0 Permalink
    You mean to open in associated editor?
    os.execute("start test.txt")

    Or manually read it contents?
    io.open and etc
  • ForumTroll
    6th Feb 2012 Banned 0 Permalink
    This post is hidden because the user is banned
  • jacob1
    6th Feb 2012 Developer 0 Permalink
    There are a few problems with that code. The first two lines should have quotation marks around ForumTroll and watr. You also don't need do's after the then's in an if statement, or the extra end that goes with them. You are also setting name to true or false, so in the last if statement you shouldn't check if the name is "ForumTroll" again, because it never will be, it is a boolean by then. After that, replace os.exit with 'tpt.el.watr.name = "test"' or 'dofile("nameoffile.txt")', and it will work.
  • ForumTroll
    6th Feb 2012 Banned 0 Permalink
    This post is hidden because the user is banned
  • ForumTroll
    6th Feb 2012 Banned 0 Permalink
    This post is hidden because the user is banned
  • jacob1
    6th Feb 2012 Developer 0 Permalink
    Delete the extra 'do', delete an 'end' at the very bottom, and change the second (third) to last line to 'if name and pass == change then tpt.el.watr.name = "test"'
  • ForumTroll
    6th Feb 2012 Banned 0 Permalink
    This post is hidden because the user is banned
  • jacob1
    6th Feb 2012 Developer 0 Permalink
    This should work, but I haven't tested it.
    name = "ForumTroll";
    local user = tpt.input("ForumTroll", "Type ForumTroll");
    if user == "ForumTroll" then name = true else name = false end
    local pass = tpt.input("watr","Type watr");
    if name and pass == "watr" then tpt.el.watr.name = "test" end


    To reply to people, disable the new editor when you edit your profile or click the far right option on the top (looks like a red '<>' on a peice of paper) before you reply to someone. This is just a glitch; when I hit reply or quote, the text appears on the very top of the page.