engine/crash/src/script_crash.cpp
/*# reads user field from a loaded crash dump
     *
     * @name crash.get_user_field
     * @param handle [type:number] crash dump handle
     * @param index [type:number] user data slot index
     * @return value [type:string] user data value recorded in the crash dump
     */
reads user field from a loaded crash dump
@name crash.get_user_field
@param handle [type:number] crash dump handle
@param index [type:number] user data slot index
@return value [type:string] user data value recorded in the crash dump
reads user field from a loaded crash dump @name crash . get_user_field @param handle [ type : number ] crash dump handle @param index [ type : number ] user data slot index @return value [ type : string ] user data value recorded in the crash dump
static int Crash_GetUserField(lua_State* L)
    {
        HDump h = CheckHandle(L, 1);
        int index = luaL_checkint(L, 2);
        if (index < 0 || index >= (int)AppState::USERDATA_SLOTS)
        {
            return luaL_error(L, "User data slot index out of range. Max elements is %d", AppState::USERDATA_SLOTS);
        }
        const char *value = GetUserField(h, index);
        if (!value)
        {
            lua_pushnil(L);
        }
        else
        {
            lua_pushstring(L, value);
        }
        return 1;
    }
static int Crash_GetUserField ( lua_State * L ) { HDump h = CheckHandle ( L , 1 ) ; int index = luaL_checkint ( L , 2 ) ; if ( index < 0 || index >= ( int ) AppState :: USERDATA_SLOTS ) { return luaL_error ( L , " " , AppState :: USERDATA_SLOTS ) ; } const char * value = GetUserField ( h , index ) ; if ( ! value ) { lua_pushnil ( L ) ; } else { lua_pushstring ( L , value ) ; } return 1 ; }
reads user field from a loaded crash dump
 @name crash.get_user_field
 @param handle [type:number] crash dump handle
 @param index [type:number] user data slot index
 @return value [type:string] user data value recorded in the crash dump
reads user field from a loaded crash dump @name crash . get_user_field @param handle [ type : number ] crash dump handle @param index [ type : number ] user data slot index @return value [ type : string ] user data value recorded in the crash dump