Page 1 of 1

ModError: Failed to run

PostPosted: Sat Apr 06, 2013 16:08
by JBone1234
I've been making my own mod for Minetest but I can't seem to get it to run. When I try to start the game, an error comes up saying:

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
ModError: Failed to load and run C:\Users\Jonathan\Documents\My Games\Minetest 0.4.5\bin\..\mods\minetest\super_pickaxe\init.lua


And here is the code from the init.lua file:

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
minetest.register_tool("super:pick", {
    description = "Super Pickaxe",
    inventory_image = "tool_superpick.png",
    tool_capabilities = {
        full_punch_interval = 1.0,
        max_drop_level=3,
        groupcaps={
            cracky={times={[1]=2.0, [2]=1.0, [3]=0.5}, uses=500, maxlevel=3},
            crumbly={times={[1]=2.0, [2]=1.0, [3]=0.5}, uses=500, maxlevel=3},
            snappy={times={[1]=2.0, [2]=1.0, [3]=0.5}, uses=500, maxlevel=3}
        }
    },
})

minetest.register_craft({
    output = 'super:pick',
    recipe = {
        {'default:mese', 'default:pick_mese', 'default:mese'},
        {'', 'default:stick', ''},
        {'', 'default:stick', ''}
    }
})

if minetest.setting_get("log_mods") then
    minetest.log("action", "super_pickaxe loaded")
end


Any help would be greatly appreciated, thanks!

PostPosted: Sat Apr 06, 2013 16:26
by PilzAdam
At the end of the debug.txt should be something like
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
18:25:55: ERROR[main]: ========== ERROR FROM LUA ===========

Can you post this section here?

PostPosted: Sat Apr 06, 2013 16:28
by JBone1234
PilzAdam wrote:At the end of the debug.txt should be something like
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
18:25:55: ERROR[main]: ========== ERROR FROM LUA ===========

Can you post this section here?


Here is the section you needed:

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
17:05:36: ERROR[main]: ========== ERROR FROM LUA ===========
17:05:36: ERROR[main]: Failed to load and run script from
17:05:36: ERROR[main]: C:\Users\Jonathan\Documents\My Games\Minetest 0.4.5\bin\..\mods\minetest\super_pickaxe\init.lua:
17:05:36: ERROR[main]: ...ames\Minetest 0.4.5\bin\..\builtin/misc_register.lua:62: Name super:pick does not follow naming conventions: "modname:" or ":" prefix required
17:05:36: ERROR[main]: stack traceback:
17:05:36: ERROR[main]:     [C]: in function 'error'
17:05:36: ERROR[main]:     ...ames\Minetest 0.4.5\bin\..\builtin/misc_register.lua:62: in function 'check_modname_prefix'
17:05:36: ERROR[main]:     ...ames\Minetest 0.4.5\bin\..\builtin/misc_register.lua:98: in function 'register_item'
17:05:36: ERROR[main]:     ...ames\Minetest 0.4.5\bin\..\builtin/misc_register.lua:205: in function 'register_tool'
17:05:36: ERROR[main]:     ...st 0.4.5\bin\..\mods\minetest\super_pickaxe\init.lua:1: in main chunk
17:05:36: ERROR[main]: =======END OF ERROR FROM LUA ========
17:05:36: ERROR[main]: Server: Failed to load and run C:\Users\Jonathan\Documents\My Games\Minetest 0.4.5\bin\..\mods\minetest\super_pickaxe\init.lua
17:05:36: ERROR[main]: ModError: Failed to load and run C:\Users\Jonathan\Documents\My Games\Minetest 0.4.5\bin\..\mods\minetest\super_pickaxe\init.lua

PostPosted: Sat Apr 06, 2013 16:33
by PilzAdam
JBone1234 wrote:
PilzAdam wrote:At the end of the debug.txt should be something like
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
18:25:55: ERROR[main]: ========== ERROR FROM LUA ===========

Can you post this section here?


Here is the section you needed:

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
17:05:36: ERROR[main]: ========== ERROR FROM LUA ===========
17:05:36: ERROR[main]: Failed to load and run script from
17:05:36: ERROR[main]: C:\Users\Jonathan\Documents\My Games\Minetest 0.4.5\bin\..\mods\minetest\super_pickaxe\init.lua:
17:05:36: ERROR[main]: ...ames\Minetest 0.4.5\bin\..\builtin/misc_register.lua:62: Name super:pick does not follow naming conventions: "modname:" or ":" prefix required
17:05:36: ERROR[main]: stack traceback:
17:05:36: ERROR[main]:     [C]: in function 'error'
17:05:36: ERROR[main]:     ...ames\Minetest 0.4.5\bin\..\builtin/misc_register.lua:62: in function 'check_modname_prefix'
17:05:36: ERROR[main]:     ...ames\Minetest 0.4.5\bin\..\builtin/misc_register.lua:98: in function 'register_item'
17:05:36: ERROR[main]:     ...ames\Minetest 0.4.5\bin\..\builtin/misc_register.lua:205: in function 'register_tool'
17:05:36: ERROR[main]:     ...st 0.4.5\bin\..\mods\minetest\super_pickaxe\init.lua:1: in main chunk
17:05:36: ERROR[main]: =======END OF ERROR FROM LUA ========
17:05:36: ERROR[main]: Server: Failed to load and run C:\Users\Jonathan\Documents\My Games\Minetest 0.4.5\bin\..\mods\minetest\super_pickaxe\init.lua
17:05:36: ERROR[main]: ModError: Failed to load and run C:\Users\Jonathan\Documents\My Games\Minetest 0.4.5\bin\..\mods\minetest\super_pickaxe\init.lua

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
17:05:36: ERROR[main]: ...ames\Minetest 0.4.5\bin\..\builtin/misc_register.lua:62: Name super:pick does not follow naming conventions: "modname:" or ":" prefix required

This tells you that you have to name it "super_pickaxe:pick". Mods always have to prefix the modname.

PostPosted: Sat Apr 06, 2013 16:34
by JBone1234
PilzAdam wrote:
JBone1234 wrote:
PilzAdam wrote:At the end of the debug.txt should be something like
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
18:25:55: ERROR[main]: ========== ERROR FROM LUA ===========

Can you post this section here?


Here is the section you needed:

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
17:05:36: ERROR[main]: ========== ERROR FROM LUA ===========
17:05:36: ERROR[main]: Failed to load and run script from
17:05:36: ERROR[main]: C:\Users\Jonathan\Documents\My Games\Minetest 0.4.5\bin\..\mods\minetest\super_pickaxe\init.lua:
17:05:36: ERROR[main]: ...ames\Minetest 0.4.5\bin\..\builtin/misc_register.lua:62: Name super:pick does not follow naming conventions: "modname:" or ":" prefix required
17:05:36: ERROR[main]: stack traceback:
17:05:36: ERROR[main]:     [C]: in function 'error'
17:05:36: ERROR[main]:     ...ames\Minetest 0.4.5\bin\..\builtin/misc_register.lua:62: in function 'check_modname_prefix'
17:05:36: ERROR[main]:     ...ames\Minetest 0.4.5\bin\..\builtin/misc_register.lua:98: in function 'register_item'
17:05:36: ERROR[main]:     ...ames\Minetest 0.4.5\bin\..\builtin/misc_register.lua:205: in function 'register_tool'
17:05:36: ERROR[main]:     ...st 0.4.5\bin\..\mods\minetest\super_pickaxe\init.lua:1: in main chunk
17:05:36: ERROR[main]: =======END OF ERROR FROM LUA ========
17:05:36: ERROR[main]: Server: Failed to load and run C:\Users\Jonathan\Documents\My Games\Minetest 0.4.5\bin\..\mods\minetest\super_pickaxe\init.lua
17:05:36: ERROR[main]: ModError: Failed to load and run C:\Users\Jonathan\Documents\My Games\Minetest 0.4.5\bin\..\mods\minetest\super_pickaxe\init.lua

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
17:05:36: ERROR[main]: ...ames\Minetest 0.4.5\bin\..\builtin/misc_register.lua:62: Name super:pick does not follow naming conventions: "modname:" or ":" prefix required

This tells you that you have to name it "super_pickaxe:pick". Mods always have to prefix the modname.


Ah right ok I get it, thanks for your help :)

PostPosted: Sat Apr 06, 2013 16:35
by PilzAdam
Also the proper section for this would be "Modding General".