The Wiki needs fixing

  • Videogamer555
    6th Oct 2013 Member 0 Permalink
    On the page https://powdertoy.co.uk/Wiki/W/Lua_API:Elements.html

    Part of it lists the constants
    SC_WALL
    SC_ELEC
    SC_POWERED
    SC_SENSOR
    SC_FORCE
    SC_EXPLOSIVE
    SC_GAS
    SC_LIQUID
    SC_POWDERS
    SC_SOLIDS
    SC_NUCLEAR
    SC_SPECIAL
    SC_LIFE
    SC_TOOL
    SC_DECO

    Using these has NO EFFECT in LUA (despite it appearing in the LUA part of the wiki)!

    I have to use the ACTUAL NUMBERS (such as 0 for walls, or 4 force based items). If these constants ONLY work in the C/C++ programming then they should NOT be shown in the wiki part for LUA. Since they are shown in the LUA section, then either the LUA interface in TPT is broken, or there's something else I have to type that is NOT DOCUMENTED in the wiki in order to use these constants.

    Admin, PLEASE fix this in the wiki (or in TPT's code) as needed.
    Edited 2 times by Videogamer555. Last: 6th Oct 2013
  • mniip
    6th Oct 2013 Developer 3 Permalink
    what is this "LUA" thing you're speaking of
    EDIT: elem.SC_WALL
    Edited once by mniip. Last: 6th Oct 2013
  • xetalim
    6th Oct 2013 Member 1 Permalink
    @Videogamer555 (View Post)
    protip: DONT say LUA in mniips presence.
    Anyway, DIY.
    Wiki is not done by moderators, wiki is done by community.
    Just like the real wikipedia, you can contribute yourself.
  • Fakenublet
    6th Oct 2013 Member 2 Permalink

    "Lua is not a f*cking abbreviation, so stop saying it in ALL CAPS!"

     

    -mniip

  • edza101
    6th Oct 2013 Member 0 Permalink

    @Videogamer555 (View Post)

     

    Hurr dur LUA durr. (no but seriously its lua not LUA!!!)

  • MiningMarsh
    6th Oct 2013 Member 4 Permalink

    What are you guys talking about?

     

    He is clearly not referring to the language Lua, but LUA.

     

    Now let me get back to my LINUX and build my WEBSERVER in PYTHON so I can host FILES on the INTERNET.

  • mniip
    6th Oct 2013 Developer 0 Permalink
    @MiningMarsh (View Post)
    What's your distribution? GENTOO
  • Simon
    6th Oct 2013 Administrator 0 Permalink
    They're constants from the C portion of the game that are exported into the "elements" (or elem for short) global table available in Lua. Refer to them like so: elements.SC_WALL
  • mniip
    6th Oct 2013 Developer 0 Permalink
  • jenn4
    7th Oct 2013 Member 0 Permalink
    @mniip (View Post)
    But one might trust the person with admin status more than _just_ a user.