Lua Text Help?

  • ForumTroll
    21st Nov 2011 Banned 0 Permalink
    This post is hidden because the user is banned
  • MasterMind555
    21st Nov 2011 Member 0 Permalink
    @ForumTroll (View Post)
    https://powdertoy.co.uk/Search.html?Search_Query=draw+text
    Look at the first result
    "
    Draw text to the screen (for one frame, only useful in scripts), 3 overloads ... I would recommend MGR (mniip's Grahpics) text drawing if you want to draw ...
    "
  • ForumTroll
    21st Nov 2011 Banned 0 Permalink
    This post is hidden because the user is banned
  • MasterMind555
    21st Nov 2011 Member 0 Permalink
    @ForumTroll (View Post)
    Seriously, You want a script but don't know how to run them
    I gave you a script
    Lrn2Luascript

    Please stop me from commiting suicide with an explosive facepalm
  • mniip
    21st Nov 2011 Developer 0 Permalink
    @MasterMind555 (View Post)
    its called MGL since someday (too lazy to search date)
  • cctvdude99
    21st Nov 2011 Member 0 Permalink
    @MasterMind555 (View Post)
    Yea, that was an old post of mine.
    @mniip (View Post)
    Meh.

    @ForumTroll (View Post)
    Dude, seriously.
    http://pastebin.com/1tjW7zZG
    Copy that.
    Make a new text file (right click > new > new text document/file) in your TPT directory (TPT's folder)
    Paste into the text file.
    Save the file with the name 'text' and make sure the file format is set to *.txt
    Open up TPT.
    Open the console.
    dofile("text.txt")
    mgr.drawln("Hello, world!",100,100,"CLNE")
    Happy now?
  • ForumTroll
    21st Nov 2011 Banned 1 Permalink
    This post is hidden because the user is banned
  • jacob1
    21st Nov 2011 Developer 0 Permalink
    I figured out the problem, there are some errors in that script preventing it from working. I don't know why it was ever released like that.
    Change "mgl.setcliprect(x1,y1,x2,y2)" to "function mgl.setcliprect(x1,y1,x2,y2)" in line 14 (just add the word function)

    Also, Change line 25 to this:
    if x>-1 and y>-1 and x<612 and y<384 and x>=mgl.cliprect.x1 and y>=mgl.cliprect.y1 and x<=mgl.cliprect.x2 and y<=mgl.cliprect.y2 and not(mgl.getpixel(x,y)==t) then
    (changing clientrect to cliprect and adding mgl. before getpixel)

    Also, it's mgl, not mgr
  • ForumTroll
    21st Nov 2011 Banned 0 Permalink
    This post is hidden because the user is banned
  • cctvdude99
    21st Nov 2011 Member 0 Permalink
    @ForumTroll (View Post)
    Jesus, calm down.
    Caps aren't necessary. Also, how was I grumpy in my post? It was helpful, it had step-by-step instructions. Not my fault the script is borked.

    Just as a wild guess, I can't see any use for the 'end' on line 14 after 'mgl.cliprect.y2=y2'. Try removing it.