mod error

  • some-one
    25th Jan 2013 Member 0 Permalink

    i was tring to code another element and i got this message

    src\simulation\elements\DECR.cpp(49): error C2084: function 'Element_DECR::~Element_DECR(void)' already has a body
    C:\Documents and Settings\xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\TPT sound mod\The-Powder-Toy-master\generated\ElementClasses.h(1594) : see previous definition of '{dtor}'

    could some one please help

  • Bekas
    25th Jan 2013 Member 0 Permalink

    did you run the generator.py ?

  • boxmein
    25th Jan 2013 Former Staff 0 Permalink
    @some-one (View Post)
    You have some element code twice. Would you be so kind and copy/paste the entire contents of DECR.cpp into http://pastebin.com/ and give me the link to it?
  • some-one
    26th Jan 2013 Member 0 Permalink

    done here is the link

    http://pastebin.com/VavVZRx4

  • boxmein
    27th Jan 2013 Former Staff 0 Permalink
    @some-one (View Post)
    #include "simulation/Elements.h"
    //#TPT-Directive ElementClass Element_DECR PT_DECR 167
    Element_DECR::~Element_DECR()
    {
    /* ... */
    Update = NULL;

    }

    Element_DECR::~Element_DECR() {}

    If you see this, there are two of the same "definitions". Remove the line in bold blue and you'll be fine.
  • some-one
    28th Jan 2013 Member 0 Permalink

    Yay thanks.

    darn got ANOTHER error

    http://pastebin.com/VPSJKVHw