Why doesn't it work?

  • Videogamer555
    31st Jan 2013 Member 0 Permalink
    Ok so I tried the new element creation LUA API with this code:
    elements.allocate("mymod","nuke")
    elements.property(elements.MYMOD_PT_NUKE,"name","NUKE")
    elements.property(elements.MYMOD_PT_NUKE,"description","It's a nuclear bomb.")
    elements.property(elements.MYMOD_PT_NUKE,"menusection",SC_SPECIAL)

    But it doesn't work. the element doesn't even appear! I was expecting it to show up but have default behavior settings (like dust or something), but it doesn't. It doesn't even appear on the menu!!!!!

    PLEASE HELP
  • Sergeant_Starfruit
    31st Jan 2013 Member 0 Permalink

    Did you think it was that easy?

  • Videogamer555
    31st Jan 2013 Member 0 Permalink
    @Sergeant_Starfruit (View Post)
    To get it to do something useful? OF COURSE IT'S NOT THAT EASY.
    But to get it to just show up on the menu, IT SHOULD BE THAT EASY.

    What are the MINIMUM requirements to make a new element?
  • boxmein
    31st Jan 2013 Former Staff 0 Permalink
    @Videogamer555 (View Post)
    You didn't capitalize the properties.
    "Name", "Description", "Menusection"

    Also you might find this useful:
    http://boxmein.web44.net/tptelements/lua/
  • Videogamer555
    31st Jan 2013 Member 0 Permalink

    boxmein:

    @Videogamer555 (View Post)
    You didn't capitalize the properties.
    "Name", "Description", "Menusection"

    Also you might find this useful:
    http://boxmein.web44.net/tptelements/lua/


    Link is dead.
  • boxmein
    31st Jan 2013 Former Staff 0 Permalink
    @Videogamer555 (View Post)
    I realized that in another post. My entire website is down. Chaos ensues. Not because of me though. I could access the FTP just fine ;_;