lua makes me ashamed

  • DCBloodHound
    17th Jun 2011 Member 0 Permalink

    tpt.create('25', '25','MERC')
  • nmd
    17th Jun 2011 Member 0 Permalink
    I made the EXACT same mistake.
    EDIT:forget it, just look at this:https://powdertoy.co.uk/Discussions/Thread/View.html?Thread=8028&PageNum=0#Message=125770
    Edited by nmd, 2011-06-15 22:07:09
  • cracker64
    17th Jun 2011 Developer 0 Permalink
    register_step takes an actual lua function, not some command, you shouldn't be using this command from the console.
  • Cr15py
    17th Jun 2011 Member 0 Permalink
    Is this a joke or a troll? My god, I'm losing faith in society -.-
    How about we use common sense, let's look at the function prototype! register_step(function). Hmm, figure it might take a function? Now, might a set of bs commands that aren't functions be a function? NO. Try defining a function and actually using real functions, might help. Try making a file containing this:
    function spamMercury()
    tpt.create(25, 25, 'merc')
    end
    tpt.register_step(spamMercury())

    Then enter this into console: dofile("file.lua")
    Edited by Cr15py, 2011-06-15 23:44:43
  • that-random-dude
    17th Jun 2011 Member 0 Permalink
    just use the old way
  • Uberness
    17th Jun 2011 Member 0 Permalink
    @GreekGuy (View Post)
    You don't really need to use LUA to do simple functions. Just do:
    !(Old Style Commands)
  • arlo
    17th Jun 2011 Member 0 Permalink
    I WANT PYTHON BACK!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!NOW!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  • CAC-Boomerang
    17th Jun 2011 Member 0 Permalink
    @arlo (View Post)

    image

    What's so hard about putting a ! in front of the old python commands? Or didn't you bother to read UBERNESS's post just above yours?

  • mniip
    17th Jun 2011 Developer 0 Permalink
    in the console:

    function abc() tpt.create(25,25,"MERC") end
    tpt.register_step(abc)
  • GreekGuy
    17th Jun 2011 Member 0 Permalink
    I know how to use python and thats what i've been using ever since lua came out by putting the ! before everything. I realized that i was supposed to make my own .lua file in TextEdit
    (macs Notepad) and i KNOW the difference between a function and a command i just didn't realize it had to be a function til now cause i didn't read into it too much. thanks for everyone's help


    (P.S. Cr15py you were a REAL help so i think you deserve a big middle finger for what you said.)
    image