Help with new element

  • Leaf1
    25th July Member 0 Permalink

    This element wont load, there is no error message either and it seems like it would work, but it wont. Please help im going insane, and I even used AI to help and it cant seem to find the problem (they are stupid)

    -- CRDE Oil CRDE
    -- Basic Element Template

    CRDE = elements.allocate("MOD", "CRDE")

    -- Base element
    elements.element(CRDE, elements.element(elements.DEFAULT_PT_DESL))

    -- Properties
    elements.property(CRDE, "Name", "CRDE")
    elements.property(CRDE, "Description", "CRDE oil, when heated it can be turned into oil, diesel, and waste byproducts.")

    elements.property(CRDE, "Colour", 0xFF31312E)

    elements.property(CRDE, "MenuSection", elem.SC_LIQUID)
    elements.property(CRDE, "MenuVisible", 1)

    -- Physics
    elements.property(CRDE, "Flammable", 10)
    elements.property(CRDE, "Explosive", 0)
    elements.property(CRDE, "Weight", 28)
    elements.property(CRDE, "Gravity", 0.2)

    -- Material
    elements.property(CRDE, "Hardness", 99)
    elements.property(CRDE, "HeatConduct", 25)

  • AerospaceFan
    25th July Member 0 Permalink

    are you sure you did loaded it with dofile()

  • Leaf1
    25th July Member 0 Permalink

    @AerospaceFan (View Post)

     Actually, I fixed it. But no, this is a new mod im making

  • NF
    25th July Member 0 Permalink

    @Leaf1 (View Post)

     Not what he asked, but ok...

  • Leaf1
    25th July Member 0 Permalink

    @NF (View Post)

     You dont (from my research) dofile mod scripts, you put them in the scripts folder and use the LUA manager to load them

  • AerospaceFan
    26th July Member 0 Permalink

    i put that in scripts folder and do dofile