Post your modding questions here

User avatar
Hybrid Dog
Member
 
Posts: 2726
Joined: Thu Nov 01, 2012 12:46

Re: Post your modding questions here

by Hybrid Dog » Fri Jan 01, 2016 09:42

done
Code: Select all
Program received signal SIGSEGV, Segmentation fault.
0x000000000094cfa0 in Client::getProtoVersion (this=0x0) at minetest/src/client.h:500
500      { return m_proto_ver; }
(gdb) bt full
#0  0x000000000094cfa0 in Client::getProtoVersion (this=0x0) at minetest/src/client.h:500
No locals.
#1  0x000000000094abcd in GUIFormSpecMenu::OnEvent (this=0x1e45e580, event=...) at minetest/src/guiFormSpecMenu.cpp:3389
        to_inv_sp = @0x1e052df0: {inventoryloc = {type = InventoryLocation::DETACHED, name = {static npos = <optimized out>,
              _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x1dc83588 "testinv"}}, p = {X = 0, Y = 0, Z = 0}}, listname = {static npos = <optimized out>,
            _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x1e49fdc8 "main"}}}
        list_from = 0x1e316b20
        to_inv_ind = 1
        inv_to = 0x1d35f0f0
        list_to = 0x1d35b520
        stack_from = {name = {static npos = <optimized out>, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x1d452fb8 "beer_test:mixed_mead_grain"}},
          count = 99, wear = 0, metadata = {static npos = <optimized out>, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>},
              _M_p = 0x7ffff57373d8 <std::string::_Rep::_S_empty_rep_storage+24> ""}}}
        mis = 2
        i = 0
        inv_selected = 0x0
        inv_s = 0x1b004a08
        drop_amount = 0
        identical = false
        button = 0
        shift_move_amount = 99
        craft_amount = 0
        s = {inventoryloc = {type = InventoryLocation::CURRENT_PLAYER, name = {static npos = <optimized out>, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>},
                _M_p = 0x7ffff57373d8 <std::string::_Rep::_S_empty_rep_storage+24> ""}}, p = {X = 0, Y = 0, Z = 0}}, listname = {static npos = <optimized out>,
            _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x1db422b8 "main"}}, i = 0}
        list_s = 0x1e316b20
        s_count = 99
        updown = 0
        move_amount = 0
        __PRETTY_FUNCTION__ = "virtual bool GUIFormSpecMenu::OnEvent(const irr::SEvent&)"
#2  0x00007ffff786ca59 in irr::gui::CGUIEnvironment::postEventFromUser(irr::SEvent const&) () from /usr/lib/x86_64-linux-gnu/libIrrlicht.so.1.8
No symbol table info available.
#3  0x00007ffff783d929 in irr::CIrrDeviceStub::postEventFromUser(irr::SEvent const&) () from /usr/lib/x86_64-linux-gnu/libIrrlicht.so.1.8
No symbol table info available.
#4  0x00007ffff7833ba6 in irr::CIrrDeviceLinux::run() () from /usr/lib/x86_64-linux-gnu/libIrrlicht.so.1.8
No symbol table info available.
#5  0x000000000090b526 in Game::run (this=0x7fffffffd5a0) at minetest/src/game.cpp:1819
        stats = {drawtime = 7, beginscenetime = 0, endscenetime = 1, dtime_jitter = {max = 0, min = 0, avg = 0,248359635, counter = -2,50299978, max_sample = 0,308620036, min_sample = 0, max_fraction = 1,23765028}, busy_time_jitter = {
            max = 0, min = 0, avg = 528,940063, counter = -2,50299978, max_sample = 0, min_sample = -507,820068, max_fraction = 0}}
        draw_times = {last_time = 116500, busy_time = 25, sleep_time = 475}
        flags = {invert_mouse = false, show_chat = true, show_hud = true, show_minimap = true, force_fog_off = false, show_debug = true, show_profiler_graph = false, disable_camera_update = false,
          first_loop_after_window_activation = true, camera_offset_changed = false}
        dtime = 0,5
        dummyvalues = {_M_t = {
            _M_impl = {<std::allocator<std::_Rb_tree_node<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> > const, float> > >> = {<__gnu_cxx::new_allocator<std::_Rb_tree_node<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> > const, float> > >> = {<No data fields>}, <No data fields>},
              _M_key_compare = {<std::binary_function<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool>> = {<No data fields>}, <No data fields>}, _M_header = {_M_color = std::_S_red, _M_parent = 0x1d370f80, _M_left = 0x1d359cc0, _M_right = 0x1d338b30}, _M_node_count = 4}}}
        runData = {dig_index = 0, new_playeritem = 0, pointed_old = {type = POINTEDTHING_NODE, node_undersurface = {X = -152, Y = 35, Z = 64}, node_abovesurface = {X = -152, Y = 36, Z = 64}, object_id = -1}, digging = false,
          ldown_for_dig = false, left_punch = false, update_wielded_item_trigger = false, reset_jump_timer = false, nodig_delay_timer = -13,4289999, dig_time = 0, dig_time_complete = 0, repeat_rightclick_timer = 0,
          object_hit_delay_timer = -13,4289999, time_from_last_punch = 43,4970284, selected_object = 0x0, jump_timer = 0, damage_flash = 0, update_draw_list_timer = 0, statustext_time = 0, fog_range = 334,03952,
          update_draw_list_last_cam_dir = {X = -0,961200178, Y = -0,195775002, Z = 0,194335714}, profiler_current_page = 0, profiler_max_page = 3, time_of_day = 0,778885305, time_of_day_smooth = 0,777260661}
        graph = {m_log = {<std::_Deque_base<ProfilerGraph::Piece, std::allocator<ProfilerGraph::Piece> >> = {
              _M_impl = {<std::allocator<ProfilerGraph::Piece>> = {<__gnu_cxx::new_allocator<ProfilerGraph::Piece>> = {<No data fields>}, <No data fields>}, _M_map = 0x1da6a990, _M_map_size = 78, _M_start = {_M_cur = 0x1e003610,
                  _M_first = 0x1e003460, _M_last = 0x1e003640, _M_node = 0x1da6aaf0}, _M_finish = {_M_cur = 0x1dc149d0, _M_first = 0x1dc14820, _M_last = 0x1dc14a00, _M_node = 0x1da6ab90}}}, <No data fields>}, m_log_max_size = 200}
        cam_view_target = {camera_yaw = 78,5699997, camera_pitch = 11,2900009}
---Type <return> to continue, or q <return> to quit---
        cam_view = {camera_yaw = 78,5699997, camera_pitch = 11,2900009}
        highlight_boxes = {<std::_Vector_base<irr::core::aabbox3d<float>, std::allocator<irr::core::aabbox3d<float> > >> = {
            _M_impl = {<std::allocator<irr::core::aabbox3d<float> >> = {<__gnu_cxx::new_allocator<irr::core::aabbox3d<float> >> = {<No data fields>}, <No data fields>}, _M_start = 0x1d36ed30, _M_finish = 0x1d36ed48,
              _M_end_of_storage = 0x1d36ed48}}, <No data fields>}
#6  0x0000000000918fa9 in the_game (kill=0xf6dd20 <porting::g_killed>, random_input=false, input=0x1116160, device=0xfe9ce0, map_dir=..., playername=..., password=..., address=..., port=30000, error_message=..., chat_backend=...,
    reconnect_requested=0x7fffffffd9db, gamespec=..., simple_singleplayer_mode=false) at minetest/src/game.cpp:4445
        game = {input = 0x1116160, client = 0x6b86e60, server = 0x0, texture_src = 0xf3f8ea0, shader_src = 0x1040e2f0, itemdef_manager = 0x1af8dad0, nodedef_manager = 0x1cb0f50, soundfetcher = {<OnDemandSoundFetcher> = {
              _vptr.OnDemandSoundFetcher = 0xb94540 <vtable for GameOnDemandSoundFetcher+16>}, m_fetched = {_M_t = {
                _M_impl = {<std::allocator<std::_Rb_tree_node<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >> = {<__gnu_cxx::new_allocator<std::_Rb_tree_node<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >> = {<No data fields>}, <No data fields>},
                  _M_key_compare = {<std::binary_function<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool>> = {<No data fields>}, <No data fields>}, _M_header = {_M_color = std::_S_red, _M_parent = 0x1d4b8c20, _M_left = 0x1da82670, _M_right = 0xfba3520}, _M_node_count = 3}}}}, sound = 0x106bd9c0, sound_is_dummy = false, soundmaker = 0x10790b20,
          chat_backend = 0x7fffffffda90, current_formspec = 0x1e45e580, eventmgr = 0x13093670, quicktune = 0xfc08e30, gui_chat_console = 0x1d3c9b10, draw_control = 0x10335dc0, camera = 0x1ce86490, clouds = 0x1d3759f0, sky = 0x1d42dc80,
          local_inventory = 0x1d374610, hud = 0x1d351550, mapper = 0x100a8450, device = 0xfe9ce0, driver = 0x10bd110, smgr = 0x1112ce0, kill = 0xf6dd20 <porting::g_killed>, error_message = 0x7fffffffd9e0,
          reconnect_requested = 0x7fffffffd9db, gamedef = 0x6b86e70, skybox = 0x0, random_input = false, simple_singleplayer_mode = false, crack_animation_length = 5, guitext = 0x1d346f80, guitext2 = 0x1d3c93f0,
          guitext_info = 0x1d349250, guitext_status = 0x1d370d30, guitext_chat = 0x1d33f410, guitext_profiler = 0x1d374690, infotext = {static npos = 18446744073709551615,
            _M_dataplus = {<std::allocator<wchar_t>> = {<__gnu_cxx::new_allocator<wchar_t>> = {<No data fields>}, <No data fields>},
              _M_p = 0x7ffff57373f8 <std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::_Rep::_S_empty_rep_storage+24> L""}}, statustext = {static npos = 18446744073709551615,
            _M_dataplus = {<std::allocator<wchar_t>> = {<__gnu_cxx::new_allocator<wchar_t>> = {<No data fields>}, <No data fields>},
              _M_p = 0x7ffff57373f8 <std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::_Rep::_S_empty_rep_storage+24> L""}}, keycache = {key = {{Key = irr::KEY_KEY_W, Char = 87 L'W', m_name = {
                  static npos = <optimized out>, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x116b088 "KEY_KEY_W"}}}, {Key = irr::KEY_KEY_S, Char = 83 L'S',
                m_name = {static npos = <optimized out>, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x1132b38 "KEY_KEY_S"}}}, {Key = irr::KEY_KEY_A,
                Char = 65 L'A', m_name = {static npos = <optimized out>, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x1132808 "KEY_KEY_A"}}}, {
                Key = irr::KEY_KEY_D, Char = 68 L'D', m_name = {static npos = <optimized out>, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>},
                    _M_p = 0x11d2a28 "KEY_KEY_D"}}}, {Key = irr::KEY_SPACE, Char = 0 L'\000', m_name = {static npos = <optimized out>,
                  _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x11d6838 "KEY_SPACE"}}}, {Key = irr::KEY_KEY_E, Char = 69 L'E', m_name = {
                  static npos = <optimized out>, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x11d7ba8 "KEY_KEY_E"}}}, {Key = irr::KEY_LSHIFT,
                Char = 0 L'\000', m_name = {static npos = <optimized out>, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x11dd948 "KEY_LSHIFT"}}}, {
                Key = irr::KEY_KEY_CODES_COUNT, Char = 0 L'\000', m_name = {static npos = <optimized out>, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>},
                    _M_p = 0x7ffff57373d8 <std::string::_Rep::_S_empty_rep_storage+24> ""}}}, {Key = irr::KEY_KEY_Q, Char = 81 L'Q', m_name = {static npos = <optimized out>,
                  _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x1287be8 "KEY_KEY_Q"}}}, {Key = irr::KEY_KEY_I, Char = 73 L'I', m_name = {
                  static npos = <optimized out>, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x1268a18 "KEY_KEY_I"}}}, {Key = irr::KEY_KEY_T, Char = 84 L'T',
                m_name = {static npos = <optimized out>, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x1286458 "KEY_KEY_T"}}}, {Key = irr::KEY_KEY_B,
                Char = 66 L'B', m_name = {static npos = <optimized out>, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x1284518 "KEY_KEY_B"}}}, {
                Key = irr::KEY_F10, Char = 0 L'\000', m_name = {static npos = <optimized out>, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>},
                    _M_p = 0x11da5c8 "KEY_F10"}}}, {Key = irr::KEY_F9, Char = 0 L'\000', m_name = {static npos = <optimized out>,
                  _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x11d8fd8 "KEY_F9"}}}, {Key = irr::KEY_KEY_F, Char = 70 L'F', m_name = {
                  static npos = <optimized out>, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x11dae78 "KEY_KEY_F"}}}, {Key = irr::KEY_KEY_G, Char = 71 L'G',
                m_name = {static npos = <optimized out>, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x1287608 "KEY_KEY_G"}}}, {Key = irr::KEY_KEY_C,
                Char = 67 L'C', m_name = {static npos = <optimized out>, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x11de588 "KEY_KEY_C"}}}, {
                Key = irr::KEY_F8, Char = 0 L'\000', m_name = {static npos = <optimized out>, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>},
                    _M_p = 0x1286968 "KEY_F8"}}}, {Key = irr::KEY_F12, Char = 0 L'\000', m_name = {static npos = <optimized out>,
                  _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x1287e38 "KEY_F12"}}}, {Key = irr::KEY_F1, Char = 0 L'\000', m_name = {
                  static npos = <optimized out>, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x11de218 "KEY_F1"}}}, {Key = irr::KEY_F2, Char = 0 L'\000',
                m_name = {static npos = <optimized out>, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x11ddef8 "KEY_F2"}}}, {Key = irr::KEY_F3,
                Char = 0 L'\000', m_name = {static npos = <optimized out>, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x127bfc8 "KEY_F3"}}}, {
                Key = irr::KEY_KEY_CODES_COUNT, Char = 0 L'\000', m_name = {static npos = <optimized out>, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>},
                    _M_p = 0x7ffff57373d8 <std::string::_Rep::_S_empty_rep_storage+24> ""}}}, {Key = irr::KEY_F5, Char = 0 L'\000', m_name = {static npos = <optimized out>,
                  _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x1133248 "KEY_F5"}}}, {Key = irr::KEY_F6, Char = 0 L'\000', m_name = {
                  static npos = <optimized out>, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x11dd328 "KEY_F6"}}}, {Key = irr::KEY_F7, Char = 0 L'\000',
                m_name = {static npos = <optimized out>, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x11d8988 "KEY_F7"}}}, {Key = irr::KEY_KEY_CODES_COUNT,
                Char = 43 L'+', m_name = {static npos = <optimized out>, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x116b638 "+"}}}, {
                Key = irr::KEY_KEY_CODES_COUNT, Char = 45 L'-', m_name = {static npos = <optimized out>, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>},
                    _M_p = 0x1166398 "-"}}}, {Key = irr::KEY_KEY_R, Char = 82 L'R', m_name = {static npos = <optimized out>,
                  _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x11cce78 "KEY_KEY_R"}}}, {Key = irr::KEY_END, Char = 0 L'\000', m_name = {
                  static npos = <optimized out>, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x11ddc08 "KEY_END"}}}, {Key = irr::KEY_HOME, Char = 0 L'\000',
---Type <return> to continue, or q <return> to quit---
                m_name = {static npos = <optimized out>, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x11ddad8 "KEY_HOME"}}}, {Key = irr::KEY_PRIOR,
                Char = 0 L'\000', m_name = {static npos = <optimized out>, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x11dddc8 "KEY_PRIOR"}}}, {
                Key = irr::KEY_NEXT, Char = 0 L'\000', m_name = {static npos = <optimized out>, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>},
                    _M_p = 0x11cb1c8 "KEY_NEXT"}}}, {Key = irr::KEY_KEY_P, Char = 80 L'P', m_name = {static npos = <optimized out>,
                  _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x112fd98 "KEY_KEY_P"}}}}}, profiler_interval = {m_accumulator = 3,49699879},
          m_cache_doubletap_jump = false, m_cache_enable_node_highlighting = false, m_cache_enable_clouds = true, m_cache_enable_particles = false, m_cache_enable_fog = true, m_cache_mouse_sensitivity = 0,200000003,
          m_repeat_right_click_time = 0,200000003}
        server_address = {static npos = <optimized out>, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x12682648 "localhost"}}
#7  0x00000000006ecf51 in ClientLauncher::run (this=0x7fffffffdd60, game_params=..., cmd_args=...) at minetest/src/client/clientlauncher.cpp:254
        game_has_run = true
        text = 0x1af98e90 L"\t"
        video_driver = 0x10bd110
        __PRETTY_FUNCTION__ = "bool ClientLauncher::run(GameParams&, const Settings&)"
        retval = true
        kill = 0xf6dd20 <porting::g_killed>
        camera = 0x1128860
        chat_backend = {m_console_buffer = {m_scrollback = 500, m_unformatted = {<std::_Vector_base<ChatLine, std::allocator<ChatLine> >> = {
                _M_impl = {<std::allocator<ChatLine>> = {<__gnu_cxx::new_allocator<ChatLine>> = {<No data fields>}, <No data fields>}, _M_start = 0x1d48f170, _M_finish = 0x1d48f218, _M_end_of_storage = 0x1d48f230}}, <No data fields>},
            m_cols = 0, m_rows = 0, m_scroll = 0, m_formatted = {<std::_Vector_base<ChatFormattedLine, std::allocator<ChatFormattedLine> >> = {
                _M_impl = {<std::allocator<ChatFormattedLine>> = {<__gnu_cxx::new_allocator<ChatFormattedLine>> = {<No data fields>}, <No data fields>}, _M_start = 0x0, _M_finish = 0x0, _M_end_of_storage = 0x0}}, <No data fields>},
            m_empty_formatted_line = {fragments = {<std::_Vector_base<ChatFormattedFragment, std::allocator<ChatFormattedFragment> >> = {
                  _M_impl = {<std::allocator<ChatFormattedFragment>> = {<__gnu_cxx::new_allocator<ChatFormattedFragment>> = {<No data fields>}, <No data fields>}, _M_start = 0x0, _M_finish = 0x0,
                    _M_end_of_storage = 0x0}}, <No data fields>}, first = true}}, m_recent_buffer = {m_scrollback = 6, m_unformatted = {<std::_Vector_base<ChatLine, std::allocator<ChatLine> >> = {
                _M_impl = {<std::allocator<ChatLine>> = {<__gnu_cxx::new_allocator<ChatLine>> = {<No data fields>}, <No data fields>}, _M_start = 0x1c085570, _M_finish = 0x1c0855b8, _M_end_of_storage = 0x1c0855d0}}, <No data fields>},
            m_cols = 0, m_rows = 0, m_scroll = 0, m_formatted = {<std::_Vector_base<ChatFormattedLine, std::allocator<ChatFormattedLine> >> = {
                _M_impl = {<std::allocator<ChatFormattedLine>> = {<__gnu_cxx::new_allocator<ChatFormattedLine>> = {<No data fields>}, <No data fields>}, _M_start = 0x0, _M_finish = 0x0, _M_end_of_storage = 0x0}}, <No data fields>},
            m_empty_formatted_line = {fragments = {<std::_Vector_base<ChatFormattedFragment, std::allocator<ChatFormattedFragment> >> = {
                  _M_impl = {<std::allocator<ChatFormattedFragment>> = {<__gnu_cxx::new_allocator<ChatFormattedFragment>> = {<No data fields>}, <No data fields>}, _M_start = 0x0, _M_finish = 0x0,
                    _M_end_of_storage = 0x0}}, <No data fields>}, first = true}}, m_prompt = {m_prompt = {static npos = 18446744073709551615,
              _M_dataplus = {<std::allocator<wchar_t>> = {<__gnu_cxx::new_allocator<wchar_t>> = {<No data fields>}, <No data fields>}, _M_p = 0x11280b8 L"]"}}, m_line = {static npos = 18446744073709551615,
              _M_dataplus = {<std::allocator<wchar_t>> = {<__gnu_cxx::new_allocator<wchar_t>> = {<No data fields>}, <No data fields>},
                _M_p = 0x7ffff57373f8 <std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::_Rep::_S_empty_rep_storage+24> L""}},
            m_history = {<std::_Vector_base<std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >, std::allocator<std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > > >> = {
                _M_impl = {<std::allocator<std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > >> = {<__gnu_cxx::new_allocator<std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > >> = {<No data fields>}, <No data fields>}, _M_start = 0x0, _M_finish = 0x0, _M_end_of_storage = 0x0}}, <No data fields>}, m_history_index = 0, m_history_limit = 500, m_cols = 0, m_view = 0, m_cursor = 0, m_nick_completion_start = 0,
            m_nick_completion_end = 0}}
        error_message = {static npos = <optimized out>, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>},
            _M_p = 0x7ffff57373d8 <std::string::_Rep::_S_empty_rep_storage+24> ""}}
        reconnect_requested = false
        first_loop = false
#8  0x00000000009a9a76 in main (argc=2, argv=0x7fffffffe058) at minetest/src/main.cpp:232
        retval = 32767
        cmd_args = {m_settings = {_M_t = {
              _M_impl = {<std::allocator<std::_Rb_tree_node<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> > const, SettingsEntry> > >> = {<__gnu_cxx::new_allocator<std::_Rb_tree_node<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> > const, SettingsEntry> > >> = {<No data fields>}, <No data fields>},
                _M_key_compare = {<std::binary_function<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool>> = {<No data fields>}, <No data fields>}, _M_header = {_M_color = std::_S_red, _M_parent = 0xf8cbf0, _M_left = 0xf8cbf0, _M_right = 0xf8cbf0}, _M_node_count = 1}}}, m_defaults = {_M_t = {
              _M_impl = {<std::allocator<std::_Rb_tree_node<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> > const, SettingsEntry> > >> = {<__gnu_cxx::new_allocator<std::_Rb_tree_node<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> > const, SettingsEntry> > >> = {<No data fields>}, <No data fields>},
                _M_key_compare = {<std::binary_function<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool>> = {<No data fields>}, <No data fields>}, _M_header = {_M_color = std::_S_red, _M_parent = 0x0, _M_left = 0x7fffffffde88, _M_right = 0x7fffffffde88}, _M_node_count = 0}}}, m_callbacks = {_M_t = {
              _M_impl = {<std::allocator<std::_Rb_tree_node<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::vector<std::pair<void (*)(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, void*), void*>, std::allocator<std::pair<void (*)(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, void*), void*> > > > > >> = {<__gnu_cxx::new_allocator<std::_Rb_tree_node<std::pair<std::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::vector<std::pair<void (*)(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, void*), void*>, std::allocator<std::pair<void (*)(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, void*), void*> > > > > >> = {<No data fields>}, <No data fields>},
                _M_key_compare = {<std::binary_function<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool>> = {<No data fields>}, <No data---Type <return> to continue, or q <return> to quit---
 fields>}, _M_header = {_M_color = std::_S_red, _M_parent = 0x0, _M_left = 0x7fffffffdeb8, _M_right = 0x7fffffffdeb8}, _M_node_count = 0}}}, m_callbackMutex = {mutex = {__data = {__lock = 0, __count = 0, __owner = 0, __nusers = 0,
                __kind = 0, __spins = 0, __elision = 0, __list = {__prev = 0x0, __next = 0x0}}, __size = '\000' <repeats 39 times>, __align = 0}}, m_mutex = {mutex = {__data = {__lock = 0, __count = 0, __owner = 0, __nusers = 0,
                __kind = 0, __spins = 0, __elision = 0, __list = {__prev = 0x0, __next = 0x0}}, __size = '\000' <repeats 39 times>, __align = 0}}}
        cmd_args_ok = true
        __debug_stacker = {m_stack = 0xf8d710, m_overflowed = false}
        __PRETTY_FUNCTION__ = "int main(int, char**)"
        game_params = {socket_port = 30000, world_path = {static npos = <optimized out>, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>},
              _M_p = 0xfe9b78 "minetest/bin/../worlds/world"}}, game_spec = {id = {static npos = <optimized out>,
              _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x7ffff57373d8 <std::string::_Rep::_S_empty_rep_storage+24> ""}}, path = {
              static npos = <optimized out>, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x7ffff57373d8 <std::string::_Rep::_S_empty_rep_storage+24> ""}},
            gamemods_path = {static npos = <optimized out>, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>},
                _M_p = 0x7ffff57373d8 <std::string::_Rep::_S_empty_rep_storage+24> ""}}, addon_mods_paths = {_M_t = {
                _M_impl = {<std::allocator<std::_Rb_tree_node<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >> = {<__gnu_cxx::new_allocator<std::_Rb_tree_node<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >> = {<No data fields>}, <No data fields>},
                  _M_key_compare = {<std::binary_function<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool>> = {<No data fields>}, <No data fields>}, _M_header = {_M_color = std::_S_red, _M_parent = 0x0, _M_left = 0x7fffffffdd20, _M_right = 0x7fffffffdd20}, _M_node_count = 0}}}, name = {static npos = <optimized out>,
              _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x7ffff57373d8 <std::string::_Rep::_S_empty_rep_storage+24> ""}}, menuicon_path = {
              static npos = <optimized out>, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x7ffff57373d8 <std::string::_Rep::_S_empty_rep_storage+24> ""}}},
          is_dedicated_server = false}
        launcher = {list_video_modes = false, skip_main_menu = false, use_freetype = true, random_input = false, address = {static npos = <optimized out>,
            _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x12682648 "localhost"}}, playername = {static npos = <optimized out>,
            _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0xf9e4e8 "playername"}}, password = {static npos = <optimized out>,
            _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x7ffff57373d8 <std::string::_Rep::_S_empty_rep_storage+24> ""}}, device = 0xfe9ce0,
          input = 0x1116160, receiver = 0xfe9c90, skin = 0x1117ee0, font = 0x0, smgr = 0x1112ce0, gamespec = {id = {static npos = <optimized out>,
              _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x7ffff57373d8 <std::string::_Rep::_S_empty_rep_storage+24> ""}}, path = {
              static npos = <optimized out>, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x7ffff57373d8 <std::string::_Rep::_S_empty_rep_storage+24> ""}},
            gamemods_path = {static npos = <optimized out>, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>},
                _M_p = 0x7ffff57373d8 <std::string::_Rep::_S_empty_rep_storage+24> ""}}, addon_mods_paths = {_M_t = {
                _M_impl = {<std::allocator<std::_Rb_tree_node<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >> = {<__gnu_cxx::new_allocator<std::_Rb_tree_node<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >> = {<No data fields>}, <No data fields>},
                  _M_key_compare = {<std::binary_function<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool>> = {<No data fields>}, <No data fields>}, _M_header = {_M_color = std::_S_red, _M_parent = 0x0, _M_left = 0x7fffffffddd0, _M_right = 0x7fffffffddd0}, _M_node_count = 0}}}, name = {static npos = <optimized out>,
              _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x7ffff57373d8 <std::string::_Rep::_S_empty_rep_storage+24> ""}}, menuicon_path = {
              static npos = <optimized out>, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x7ffff57373d8 <std::string::_Rep::_S_empty_rep_storage+24> ""}}},
          worldspec = {path = {static npos = <optimized out>, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>},
                _M_p = 0xfe9b78 "minetest/bin/../worlds/world"}}, name = {static npos = <optimized out>,
              _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x1126d78 "[--world parameter] [new]"}}, gameid = {static npos = <optimized out>,
              _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0xf98768 "minetest"}}}, simple_singleplayer_mode = false, current_playername = {
            static npos = <optimized out>, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0xf9e4e8 "playername"}}, current_password = {
            static npos = <optimized out>, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x7ffff57373d8 <std::string::_Rep::_S_empty_rep_storage+24> ""}},
          current_address = {static npos = <optimized out>, _M_dataplus = {<std::allocator<char>> = {<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>}, _M_p = 0x12682648 "localhost"}}, current_port = 30000}


This time l noticed that it didn't crash when the player didn't open the ESC menu.

‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪
 

User avatar
rubenwardy
Moderator
 
Posts: 5965
Joined: Tue Jun 12, 2012 18:11
Location: United Kingdom
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

Re: Post your modding questions here

by rubenwardy » Fri Jan 01, 2016 14:19

I see the problem, the client is uninitialised or null:

Client::getProtoVersion (this=0x0)

But the cause of this will require looking through the code.
 

User avatar
Hybrid Dog
Member
 
Posts: 2726
Joined: Thu Nov 01, 2012 12:46

Re: Post your modding questions here

by Hybrid Dog » Sun Jan 03, 2016 18:55

Where did l download this picture?
Image

And why can't l upload pictures to minetest wiki and dev wiki?
Attachments
rVsZcTP.png
(44.9 KiB) Not downloaded yet

‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪‮
‮‪
 

amadin
Member
 
Posts: 548
Joined: Tue Jun 16, 2015 16:23
 

amadin
Member
 
Posts: 548
Joined: Tue Jun 16, 2015 16:23

Re: Post your modding questions here

by amadin » Tue Jan 05, 2016 20:13

I try add player animation (sit) to sofas (https://github.com/thefamilygrog66/lrfu ... /sofas.lua) in
Code: Select all
on_rightclick = function(pos, node, clicker)

but string
Code: Select all
default.player_set_animation(clicker, "lay" , 0)

don't work for me? player not changed animation. What i do wrong?
 

Byakuren
Member
 
Posts: 816
Joined: Tue Apr 14, 2015 01:59
GitHub: raymoo
IRC: Hijiri
In-game: Raymoo + Clownpiece

Re: Post your modding questions here

by Byakuren » Wed Jan 06, 2016 07:30

Do players keep their velocity after being detached from an entity?
Every time a mod API is left undocumented, a koala dies.
 

User avatar
stu
Member
 
Posts: 923
Joined: Sat Feb 02, 2013 02:51
Location: United Kingdom
GitHub: stujones11

Re: Post your modding questions here

by stu » Wed Jan 06, 2016 19:41

Byakuren wrote:Do players keep their velocity after being detached from an entity?

If you mean the velocity of the entity they were attached to then no, they do not. They will, however, suffer the effects of gravity if detaching from a height ;-)
 

Byakuren
Member
 
Posts: 816
Joined: Tue Apr 14, 2015 01:59
GitHub: raymoo
IRC: Hijiri
In-game: Raymoo + Clownpiece

Re: Post your modding questions here

by Byakuren » Wed Jan 06, 2016 20:24

stu wrote:
Byakuren wrote:Do players keep their velocity after being detached from an entity?

If you mean the velocity of the entity they were attached to then no, they do not. They will, however, suffer the effects of gravity if detaching from a height ;-)

Alright, thank you.
Every time a mod API is left undocumented, a koala dies.
 

User avatar
stu
Member
 
Posts: 923
Joined: Sat Feb 02, 2013 02:51
Location: United Kingdom
GitHub: stujones11

Re: Post your modding questions here

by stu » Wed Jan 06, 2016 20:58

Byakuren wrote:
stu wrote:
Byakuren wrote:Do players keep their velocity after being detached from an entity?

If you mean the velocity of the entity they were attached to then no, they do not. They will, however, suffer the effects of gravity if detaching from a height ;-)

Alright, thank you.

You're welcome, what was it you were trying to achieve anyway? maybe there is another way to accomplish that.
 

User avatar
iangp
Member
 
Posts: 114
Joined: Sat May 31, 2014 19:26
Location: Brasil - ES
GitHub: 14NGiestas
IRC: iangp
In-game: iangp

Re: Post your modding questions here

by iangp » Wed Jan 06, 2016 22:33

Hey guys,
Is there some way to a mod cause some error like that?
Code: Select all
*** Error in `minetest': double free or corruption (fasttop): 0x0000000001239c60 ***
Abortado (imagem do núcleo gravada)

Or Is just my minetest build? I just retype and then it runs but it's a strange issue
Last edited by iangp on Thu Jan 07, 2016 11:36, edited 1 time in total.
God's not dead, He's surely alive!
エル プサイ コングルー

My mods (WIP):
 

Byakuren
Member
 
Posts: 816
Joined: Tue Apr 14, 2015 01:59
GitHub: raymoo
IRC: Hijiri
In-game: Raymoo + Clownpiece

Re: Post your modding questions here

by Byakuren » Thu Jan 07, 2016 00:34

Does minetest.get_gametime() return the number of seconds the world has been active? As in, it doesn't count up when the world is not being played. Also, is it dependent on simulation speed, i.e. will it slow down if not enough ticks are being processed quickly enough?
Every time a mod API is left undocumented, a koala dies.
 

User avatar
Nathan.S
Member
 
Posts: 969
Joined: Wed Sep 24, 2014 17:47
Location: Bigsby Texas
GitHub: NathanSalapat
IRC: NathanS21
In-game: NathanS21

Re: Post your modding questions here

by Nathan.S » Thu Jan 07, 2016 16:22

Question about best practices, I am changing the speed that a player gets thirsty in the thirst mod based off the month from the mymonths mod. Would it be better to make the changes in the thirst mod and have that read the month, or would it be better to do the changes in the mymonths mod and have that modify the thirst mod, or would there probably not be any difference.
I record Minetest videos, Mod reviews, Modding tutorials, and Lets plays.
Check out my website, and brand new Minetest Modding Course
 

User avatar
kaeza
Moderator
 
Posts: 2162
Joined: Thu Oct 18, 2012 05:00
Location: Montevideo, Uruguay
GitHub: kaeza
IRC: kaeza diemartin blaaaaargh
In-game: kaeza

Re: Post your modding questions here

by kaeza » Thu Jan 07, 2016 16:40

Your thirst depends on the month, not the other way around, so the best thing to do would be to translate that into code and modify thirst.

This also makes it easier in case you want to distribute the modified mod, or offer a patch for thirst.
Your signature is not the place for a blog post. Please keep it as concise as possible. Thank you!

Check out my stuff! | Donations greatly appreciated! PayPal
 

User avatar
Don
Member
 
Posts: 1643
Joined: Sat May 17, 2014 18:40
GitHub: DonBatman
IRC: Batman
In-game: Batman

Re: Post your modding questions here

by Don » Thu Jan 07, 2016 16:48

@Nathan - Just my opinion - I think changes should be in the thirst mod since the changes only effect the thirst mod. Either way would work but keeping the code with thirst would make it so if mymonths was forked and changed then thirst could easily be changed to work with the fork. I have no objections to adding it to mymonths if that is what you choose.
Many of my mods are now a part of Minetest-mods. A place where you know they are maintained!

A list of my mods can be found here
 

User avatar
kaeza
Moderator
 
Posts: 2162
Joined: Thu Oct 18, 2012 05:00
Location: Montevideo, Uruguay
GitHub: kaeza
IRC: kaeza diemartin blaaaaargh
In-game: kaeza

Re: Post your modding questions here

by kaeza » Thu Jan 07, 2016 16:49

Byakuren wrote:Does minetest.get_gametime() return the number of seconds the world has been active? As in, it doesn't count up when the world is not being played. Also, is it dependent on simulation speed, i.e. will it slow down if not enough ticks are being processed quickly enough?

It returns the time in seconds since you created the world, and is only incremented while the server is running.

It apparently discards the fractions of a second when the server shuts down, so it's not 100% precise. Depending on what you need the time for, and your precision needs, you'd be better with updating your own timer and saving/restoring from a file in the world directory.
Your signature is not the place for a blog post. Please keep it as concise as possible. Thank you!

Check out my stuff! | Donations greatly appreciated! PayPal
 

User avatar
Nathan.S
Member
 
Posts: 969
Joined: Wed Sep 24, 2014 17:47
Location: Bigsby Texas
GitHub: NathanSalapat
IRC: NathanS21
In-game: NathanS21

Re: Post your modding questions here

by Nathan.S » Thu Jan 07, 2016 17:15

Thanks guys.
I record Minetest videos, Mod reviews, Modding tutorials, and Lets plays.
Check out my website, and brand new Minetest Modding Course
 

User avatar
rubenwardy
Moderator
 
Posts: 5965
Joined: Tue Jun 12, 2012 18:11
Location: United Kingdom
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

Re: Post your modding questions here

by rubenwardy » Thu Jan 07, 2016 18:05

kaeza wrote:
Byakuren wrote:Does minetest.get_gametime() return the number of seconds the world has been active? As in, it doesn't count up when the world is not being played. Also, is it dependent on simulation speed, i.e. will it slow down if not enough ticks are being processed quickly enough?

It returns the time in seconds since you created the world, and is only incremented while the server is running.

It apparently discards the fractions of a second when the server shuts down, so it's not 100% precise. Depending on what you need the time for, and your precision needs, you'd be better with updating your own timer and saving/restoring from a file in the world directory.


Also note that game time isn't reliable as env_data.txt is often corrupted (so gametime may be reset after a shutdown)
 

Byakuren
Member
 
Posts: 816
Joined: Tue Apr 14, 2015 01:59
GitHub: raymoo
IRC: Hijiri
In-game: Raymoo + Clownpiece

Re: Post your modding questions here

by Byakuren » Thu Jan 07, 2016 20:51

kaeza wrote:
Byakuren wrote:Does minetest.get_gametime() return the number of seconds the world has been active? As in, it doesn't count up when the world is not being played. Also, is it dependent on simulation speed, i.e. will it slow down if not enough ticks are being processed quickly enough?

It returns the time in seconds since you created the world, and is only incremented while the server is running.

It apparently discards the fractions of a second when the server shuts down, so it's not 100% precise. Depending on what you need the time for, and your precision needs, you'd be better with updating your own timer and saving/restoring from a file in the world directory.

rubenwardy wrote:
kaeza wrote:
Byakuren wrote:Does minetest.get_gametime() return the number of seconds the world has been active? As in, it doesn't count up when the world is not being played. Also, is it dependent on simulation speed, i.e. will it slow down if not enough ticks are being processed quickly enough?

It returns the time in seconds since you created the world, and is only incremented while the server is running.

It apparently discards the fractions of a second when the server shuts down, so it's not 100% precise. Depending on what you need the time for, and your precision needs, you'd be better with updating your own timer and saving/restoring from a file in the world directory.


Also note that game time isn't reliable as env_data.txt is often corrupted (so gametime may be reset after a shutdown)


Okay, thank you both!
Every time a mod API is left undocumented, a koala dies.
 

RREDesigns
Member
 
Posts: 10
Joined: Fri Jan 08, 2016 04:32
GitHub: rredesigns
IRC: R_R_E_Designs
In-game: R_R_E_Designs

Re: Post your modding questions here

by RREDesigns » Fri Jan 08, 2016 04:37

Hello everyone. I seem to have a huge problem trying to write scripts for a mod. I did my best trying to follow what the API reference says, but I get nothing but errors. Check this code:

Code: Select all
minetest.register_chatcommand("getpname",function(player)
                              local user = player:get_player_name()   
                              if user ~= nil then
                                 minetest.chat_send_player(user, tostring(user))
                                return     
                              else
                                 minetest.chat_send_player(user, "No name retrieved.")
                                return
                              end
                              end)


I'm just trying to retrieve the player name and can't even do that. MT will complain about everything, no matter of what. So, this minetest.* methods has to be used under certain scopes or what? How is it that var = minetest.get_player_name() won't leave me with a string in my var (I tried that way too)?
 

User avatar
iangp
Member
 
Posts: 114
Joined: Sat May 31, 2014 19:26
Location: Brasil - ES
GitHub: 14NGiestas
IRC: iangp
In-game: iangp

Re: Post your modding questions here

by iangp » Fri Jan 08, 2016 12:05

RREDesigns wrote:Hello everyone. I seem to have a huge problem trying to write scripts for a mod. I did my best trying to follow what the API reference says, but I get nothing but errors. Check this code:

Code: Select all
minetest.register_chatcommand("getpname",function(player)
                              local user = player:get_player_name()   
                              if user ~= nil then
                                 minetest.chat_send_player(user, tostring(user))
                                return     
                              else
                                 minetest.chat_send_player(user, "No name retrieved.")
                                return
                              end
                              end)


I'm just trying to retrieve the player name and can't even do that. MT will complain about everything, no matter of what. So, this minetest.* methods has to be used under certain scopes or what? How is it that var = minetest.get_player_name() won't leave me with a string in my var (I tried that way too)?



What are you doing (exactly)?
minetest.register_chatcommand("cmd", {chatcommand definition})
{chatcommand definition} isn't a function, it's a table.
see:
http://dev.minetest.net/minetest.register_chatcommand

You must put this function inside the table
Code: Select all
{
   params = "<name>",
   description = "Some desc",
        func = function( name , param) -- name: player name, param: name passed
                              local player = minetest.get_player_by_name(param)
                              if param ~= nil then
                                   minetest.chat_send_player(player, tostring(player))
                                   return
                              else
                                   minetest.chat_send_player(player, "No name retrieved.")
                                   return
                              end
        end)
}
God's not dead, He's surely alive!
エル プサイ コングルー

My mods (WIP):
 

User avatar
rubenwardy
Moderator
 
Posts: 5965
Joined: Tue Jun 12, 2012 18:11
Location: United Kingdom
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
 

RREDesigns
Member
 
Posts: 10
Joined: Fri Jan 08, 2016 04:32
GitHub: rredesigns
IRC: R_R_E_Designs
In-game: R_R_E_Designs

Re: Post your modding questions here

by RREDesigns » Fri Jan 08, 2016 13:26

I tried to do that about 20 times, in different ways, including a funtion defined outside the list. It just doesn't work. I think I forgot to make a list this last time, so I fixed it, but it doesn't work. Then I tried to copy the code provided by "iangp" and that doesn't work either, the error:

ServerError: Lua: Runtime error from mod 'testmod' in callback on_chat_message():***/init.lua:11: bad argument #1 to 'chat_send_player' (string expected, got nil)

I clearly said I wanted to retrieve the player's name. All I need is to store it's name in a var to use it later in other strings operations. I used the chat to print it, just to check wheter it was working or not.
 

RREDesigns
Member
 
Posts: 10
Joined: Fri Jan 08, 2016 04:32
GitHub: rredesigns
IRC: R_R_E_Designs
In-game: R_R_E_Designs

Re: Post your modding questions here

by RREDesigns » Fri Jan 08, 2016 13:29

Also, I was reading the mods scripts, and noticed that in most of them they make use of undefined/undeclared vars and arguments, like in the teleport mod, where "sender" and "receiver" are used all over the file, but never initialised. What's up with that?
 

User avatar
rubenwardy
Moderator
 
Posts: 5965
Joined: Tue Jun 12, 2012 18:11
Location: United Kingdom
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

Re: Post your modding questions here

by rubenwardy » Fri Jan 08, 2016 13:52

I can't find a teleport mod.

Please take the time to read that chapter. The code should be this:

Code: Select all
minetest.register_chatcommand("getpname", {
       description = "Some desc",
       func = function(name , param)
                if name ~= nil then
                       return true, name
               else
                       -- this will never run, as far as I know.
                       return false, "No name retrieved."
               end
        end)
})


When player1 runs /getpname blah blah, func will be called with
name == "player1"
param == "blah blah".

The reason that a player name rather than a player object is passed is because the player might not actually be online, but may be running commands from IRC. So don't assume that minetest.get_player_by_name will work in a chat command call back.
 

RREDesigns
Member
 
Posts: 10
Joined: Fri Jan 08, 2016 04:32
GitHub: rredesigns
IRC: R_R_E_Designs
In-game: R_R_E_Designs

Re: Post your modding questions here

by RREDesigns » Fri Jan 08, 2016 14:08

Ok, cool. I'm trying that now.

How is it that "name" and "param" get their values?
 

PreviousNext

Return to Modding Discussion



Who is online

Users browsing this forum: sorcerykid and 3 guests