Graphics func keeps crashing TPT

  • Videogamer555
    1st Feb 2013 Member 0 Permalink
    Ok so I made this custom graphics function for an element I made in TPT, and but keeps crashing TPT

    function NaVPgraphics(i,r,g,b)
    if tpt.get_property("life",i) > 0 then
    return 0,70,255,255,192,0,0,0,0,0
    else
    return 0,22000,0,128,128,128,0,128,128,128
    end
    end
    elements.property(elements.MYMOD_PT_NAVP,"Graphics",NaVPgraphics)

    It runs for a few seconds, then TPT closes down! And on top of that, it doesn't display the way it should.
    My reference for graphics functions (such as what the passed parameters and returned parameters are) in LUA is the official TPT wiki page https://powdertoy.co.uk/Wiki/W/Lua.html#tpt.graphics_func

    Please help me figure out why it's not working. Is it broken in the latest version of TPT++?