Lua Help Thread

  • kerbal1234
    4th Jan 2012 Member 0 Permalink
    Purpose: This thread is solely dedicated to people who have any Lua question. This thread will hopefully prevent people from making an entire thread for a single question.

    Format: This is the format explaining how you would post here:
    1-question format:
    1.place your question/s in this section, ordered by a number so people do not think your question\s are all together.
    2.(question here and in one)
    (etc)

    2-Answer format:
    @(user you are responding to)
    (what question you are answering, E.G 1,2)
    Answer here:

    Okay, start asking and answering.

    1. why does this code not make my element light blue?
    tpt.el.brel.name="DMNP"
    tpt.el.brel.desscription="Diamond powder."
    tpt.el.brel.menusection=6
    tpt.el.brel.flammable=0
    tpt.el.brel.color=0xCFFFEF
  • me4502
    4th Jan 2012 Member 0 Permalink
    @kerbal1234 (View Post)

    1:

    it works on dust, but, brel may have its own graphics section thingy that overrides it... Powder-Sim will have a full Graphics API in the next version xD
  • jacksonmj
    4th Jan 2012 Developer 0 Permalink
    @kerbal1234 (View Post)
    Some element graphics are cached, and the cache is not yet cleared when tpt.el is modified - so graphics might not change when tpt.el.colour or tpt.el.properties are changed.

    This has been fixed for the next version.
  • kerbal1234
    4th Jan 2012 Member 0 Permalink
    @me4502 (View Post)
    Thank you for using the format! i am exited for powder sim's next release.
    @jacksonmj (View Post)
    Great. I shall get the new beta! or 70.2... I dont know. @_@
  • lillepallt
    4th Jan 2012 Member 0 Permalink
    2. I'm a noob on the area and it just wont work out for me :/ you see, tpt wont run my autorun.lua let me explain step by step how I do and you may error report me :). 1, I go to my tpt directory file and create a new textfile. 2 I copy paste some nice described code from the forum to my textfile. 3 I save it as a textfile (.txt) named autorun.lua. 4 I open tpt but it doesn't seem to work so I open console and type in dofile('autorun.lua') and then I get the console error message that it cannot find autorun.lua so what did I do wrong? :/
  • me4502
    4th Jan 2012 Member 0 Permalink
    @lillepallt (View Post)

    2:

    in folder options in control panel, go to the second tab and de-select hide extensions for known file types...

    then rename autorun.lua and remove the .txt from the end
  • lillepallt
    4th Jan 2012 Member 0 Permalink
    2. It worked, thanks alot ^^ althought stick to the post format please
  • me4502
    4th Jan 2012 Member 0 Permalink
    @lillepallt (View Post)

    2: ok, corrected it... happy now?
  • kerbal1234
    4th Jan 2012 Member 0 Permalink
    @lillepallt (View Post)
    that was the correct way.
    Also can somebody fix this?
    http://www.mediafire.com/download.php?aygca38h13b5bv1
    PM me for password. it is confidential ATM. (not really, but i like my privacy.)
  • ArtMaster
    4th Jan 2012 Banned 0 Permalink
    This post is hidden because the user is banned